Re: New window placement (was: Re: Focus stealing prevention)



Currently metacity works very very hard to do the right thing in window
placement for xinerama.  It works more or less as follows:

1) Try to find a place for the window on the current xinerama
2) Construct a "natural xinerama ordering" which is a breadth-first
traversal of the xinerama graph from the xinerama containing the mouse
point, with preference to left, then right, then up, then down.
3) walk the natural xinerama ordering to find a nearby xinerama with an
empty space that could contain the window
4) if the window is big enough to be maximized, try to find an empty
xinerama where it could go
5) if there is nowhere the window can fit, fall back to a cascade on the
xinerama containing the pointer

I find that this algorithm makes it exceedingly easy to make good use of
all the space available on both screens.  A simple "always on current
xinerama" policy would simply encourage users to use only one xinerama,
which is really just silly.  If you have two monitors, why not use them?

The one improvement that I'd like to make here is to improve the cascade
algorithm so that it doesn't ever just place window at the upper left
corner of the screen.

-Rob

On Mon, 2004-12-06 at 13:39 +0100, uws wrote:
> På Mon, Dec 06, 2004 at 07:28:09AM -0500, Larry W. Virden skrev:
> > From: uws <uws xs4all nl>
> > > Another Metacity enhancement request: open new windows on the screen the
> > > mouse cursor is on. A lot of new windows are placed on my secondary monitor,
> > > while I'm working on the first one.
> 
> > > Is this a useful feature for Metacity?
> 
> > Perhaps this needs to be a preference.  I know myself that I want
> > new application windows to appear on the same monitor and
> > workspace as the parent application window .
> 
> Sounds reasonable. The case I was thinking of was:
> 
> - Start an application using a keyboard shortcut (I tend to use meta-[qwert]
>   for menu, web browser, nautilus, run dialog and terminal)
> - Hit the key combo again because you didn't see the terminal window popping
>   up on my secondary monitor.
> 
> Now I end up with two terminals windows :(
> 
> So, the question is: What to do with new windows that don't have a parent
> window? I think we have two choices:
> 
> 1. Same monitor as the mouse pointer
> 2. Same monitor as the current activated window
> 
> I think option 2 is the best choice. If no window was active, metacity could
> use option 1.
> 
>   mvrgr, Wouter
> 
> _______________________________________________
> desktop-devel-list mailing list
> desktop-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/desktop-devel-list




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