Re: [PATCH] make "Open Location" dialog multihead aware



On 7/23/05, Davyd Madeley <davyd madeley id au> wrote:
> As per bug #143784 [1]:
> 
> Nautilus windows and dialogs are centred on their parent, this
> doesn't work when their parent is the desktop, as the desktop spans
> all monitors the  dialog commonly ends up in the split between
> monitors (ie. the centre).
> 
> This patch [2] checks to see if the parent NautilusWindow is the
> desktop and then repositions the "Open Location" dialog
> appropriately based on the monitor that the mouse is currently on.

Seems like Metacity ought to have that placement algorithm built in so
nautilus and any other span-multiple-xinerama windows can just work
(after all, Metacity is the one that chooses "center on parent"
already anyway, and appears to already have code in that section to
"clip to xinerama of parent" which is apparently something a little
different than what you are proposing).  Even if we don't want to do
this in general (e.g. may by problematic for windows that are half on
one screen half on another but don't fully cover both screens), we
could probably do this for at least _NET_WM_WINDOW_TYPE_DESKTOP
windows. Havoc, sound reasonable?

I don't have a dual-screen setup anywhere to try this out, but the
relevant code to fix can be found under
metacity/src/place.c:meta_window_place--search for "/* Center
horizontally, at top of parent vertically */" in that function.

Cheers,
Elijah



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]