After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 143784 - Initial spatial window placement is Xinerama ignorant.
Initial spatial window placement is Xinerama ignorant.
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.11.x
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
constraints_experiments:targeted
: 170154 309101 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-06-05 21:10 UTC by Sebastien Bacher
Modified: 2008-06-19 12:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make Ctrl-L dialog Xinerama aware (1.54 KB, patch)
2005-07-23 17:47 UTC, Danielle Madeley
none Details | Review
two dialogs (5.29 KB, patch)
2005-07-24 04:31 UTC, Danielle Madeley
none Details | Review

Description Sebastien Bacher 2004-06-05 21:10:13 UTC
This bug has been reported in the Debian BTS: http://bugs.debian.org/249921

"1) Create a new folder on your Destop.
2) Open the new folder.
3) Be annoyed as the window is placed in the center of your multi-monitor
configuration.

The spatial Nautilus seems to be overriding GTK+'s support for Xinerama. It
appears to be taking the total desktop size and placing the window in that
center rather than just calculating for a particular head."
Comment 1 Adam Kessel 2004-06-15 17:38:30 UTC
Related issue: I understand one of the features of spacial nautilus is that it
remembers where a folder was when it was last closed.  Apparently, this memory
spans the Xinerama displays, so if you last closed a folder on the right side,
it will reopen on the right side, even if the "parent" window is on the left side.

This is quite counterintuitive and means you need to keep looking back and forth
between displays and dragging folders back where they belong.  If nautilus is
going to remember the last state of your window, it should be with respect to
the active Xinerama display, not the entire (double-width) desktop.
Comment 2 Teppo Turtiainen 2005-07-02 15:36:16 UTC
*** Bug 309101 has been marked as a duplicate of this bug. ***
Comment 3 Danielle Madeley 2005-07-02 15:41:36 UTC
Setting versions.
Comment 4 Teppo Turtiainen 2005-07-02 17:26:27 UTC
*** Bug 170154 has been marked as a duplicate of this bug. ***
Comment 5 Danielle Madeley 2005-07-23 16:16:31 UTC
Without looking at the code, it would seem the reason for this is that windows
and dialog boxes (such as the open location dialog) are being parented on the
window that is the Nautilus desktop (which spans both screens) and centred on
that parent.

I'm going to tentatively mark this as a GNOME 2.12 bug, as this is a highly user
visible bug that will annoy the industry movers and shakers who we want to write
good reviews about us.
Comment 6 Danielle Madeley 2005-07-23 17:47:23 UTC
Created attachment 49628 [details] [review]
make Ctrl-L dialog Xinerama aware

This is the first patch of what could end up a number like it. It checks to see
if the window is in fact the desktop window, and then repositions the dialog to
not be centred on the parent (ie, spanning screens). The dialog is centred on
the window which currently has the mouse on it.

It might pay to have this calculation split out into a generic utility
function. This has not currently been tested on a single monitor machine, but
could be activated with use of the call gdk_screen_get_n_monitors() if
required.
Comment 7 Alex Duggan 2005-07-23 18:44:24 UTC
The delete confirmation dialog also suffers from this problem, so it's probably
a good idea to split this out into a utility function.
Comment 8 Danielle Madeley 2005-07-24 03:22:45 UTC
Elijah suggests fixing this placement in Metacity. For what it's worth, Sawfish
seems to be doing something like that. The question is how do we handle dialogs
centred over parents in a more general case, do we centre them over the part of
the window on one monitor?
Comment 9 Danielle Madeley 2005-07-24 04:31:48 UTC
Created attachment 49662 [details] [review]
two dialogs

Move the recentring code into a utility function. Make location dialog, and
delete confirmation recentre on the focused monitor.
Comment 10 Alexander Larsson 2005-08-24 08:27:14 UTC
Since nautilus isn't setting any window position here i think this should be
fixed in metacity. After all, metacity is what decides to center the dialog over
the parent. If this e.g. changes in the future, then the hardcoded fix in
nautilus would be wrong.

Metacity could either special-case _NET_WM_WINDOW_TYPE_DESKTOP, or just in
general handle window placement of child windows where the parent occupies
several xinerama screens better.
Comment 11 Elijah Newren 2005-08-24 15:45:28 UTC
I don't think this is a release showstopper (it's annoying, but that's about
it), so I'm dropping the Gnome 2.12 milestone.  For those that have a xinerama
setup to test with and would like to tackle this bug, look for "/* Center
horizontally, at top of parent vertically */" in meta_window_place() (which is
in metacity/src/place.c)
Comment 12 Elijah Newren 2005-11-19 17:15:33 UTC
[Cue Wizard of Oz music]

Ding! Dong!  The bug is dead!
The wicked bug,
The wicked bug,
Ding! Dong!  The wicked bug is dead...