Home » Questions » Computers [ Ask a new question ]

Metacity (Gnome VM) - restrict placement of windows to primary display of "Screen 0"?

Metacity (Gnome VM) - restrict placement of windows to primary display of "Screen 0"?

How can I restrict the auto-placement of all windows by metacity? Either by restricting to Monitor0 or to avoid the "dead space" of my display?

Asked by: Guest | Views: 270
Total answers/comments: 1
Guest [Entry]

"My original ""dead space"" problem was fixed after the reboot. It seems Metacity refuses any restrict window placement, so I can either:

Stop using Metacity, or
Keep a window opened on the 2nd monitor to encourage placement on the primary monitor (I do this anyhow).

Apparently, the Gnome Metacity developers thought that placing windows on only one monitor is ""just silly"" (see quote below).

From the Gnome desktop-devel-list from a few years back:

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"