Re: [Usability] Spatial Improvement: Default windows placement



On Tue, 2004-10-12 at 18:40 +0700, Zakaria wrote:

> As you may know the window placement in metacity is:
> 1. Put the window in the center of screen
> 2. Put the next window in the top left corner
> 3. Put the next window slightly lower and right
>    from the window in top left corner
> 4. Repeat step 3

Actually that's not true.  The way it works is as follows:
1. Construct a "natural xinerama order" which is a breadth-first
traversal of the xineramas wherein we first try left, then right, then
up, then down, thus constructing a list of the "closest" xineramas.
2. Search each xinerama in the list in turn and try to find a position
for the new window either below or to the right of another window such
that it will not overlap another window.
3. Attempt "center tiling" on each xinerama in turn.  This involves
calculating the required position the window such that we an fit as many
on the screen as will fit, and the resulting set of windows will be
"visually centered", meaning that there is twice as much space below the
window as above it.  For large windows, the single window will be
visually centered.
4. If there's nowhere on any xinerama that the window fits without
overlapping another window, fall back to cascading the window from the
upper left corner.

-Rob





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