Open Bug 540991 Opened 16 years ago Updated 4 years ago

Firefox starts out too tall, if Compiz is enabled, on a multi-monitor machine

Categories

(Core :: Widget: Gtk, defect, P5)

x86
Linux
defect

Tracking

()

People

(Reporter: dholbert, Unassigned)

Details

STEPS TO REPRODUCE: 1. Be using a multi-monitor Linux machine. (Mine is configured with "nvidia-settings" to be in "TwinView" mode, for an very wide virtual desktop) 2. Enable normal Compiz effects. (System | Preferences | Appearance, "Visual Effects" tab, "Normal" radio-button) 3. Have a gnome-panel at the top or bottom of the screen. Make it extra-tall (say, 40px) to exaggerate the effects of this bug. 4. Start firefox with a freshly-initialized profile: mkdir /tmp/foobar; firefox -no-remote -profile /tmp/foobar EXPECTED RESULTS: Firefox should start with a window that fits on the screen. ACTUAL RESULTS: Firefox window is too tall -- the bottom goes off the screen. (or goes behind the bottom gnome-panel, if you've got one) Not a recent regression -- I tested Firefox 3.0 as well as mozilla-central trunk, and both are affected. Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a1pre) Gecko/20100120 Minefield/3.7a1pre Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.16pre) Gecko/2009103004 GranParadiso/3.0.16pre The bug goes away (in both Firefox 3.0 & m-c) if I disable Compiz effects. (I choose "None" in step 2) I also get no bug on a single-monitor (laptop) machine that has Compiz effects enabled. NOTE: dbaron provided the following fix-hints in IRC: "the thing to read is nsScreenManagerGtk :: Init and then the two different Init methods of nsScreenGtk. and note that all the toolbar avoidance stuff is only in one of those two Init methods"
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
So the toolbar-avoidance stuff is only in the first nsScreenGtk::Init method -- the one that takes a GdkWindow* arg. We call that first Init method if we've got one screen (or if we failed at looking up screen info): > 198 if (!screenInfo || numScreens == 1) { > [...] > 212 screen->Init(mRootWindow); http://mxr.mozilla.org/mozilla-central/source/widget/src/gtk2/nsScreenManagerGtk.cpp#212 (Note that "mRootWindow" there is a GdkWindow*) Otherwise (if we have more than one screen), we call the other nsScreenGtk::Init method -- the one without the toolbar avoidance code: > 218 else { > [...] > 222 for (int i = 0; i < numScreens; ++i) { > [...] > 234 screen->Init(&screenInfo[i]); http://mxr.mozilla.org/mozilla-central/source/widget/src/gtk2/nsScreenManagerGtk.cpp#234 (Note that "&screenInfo[i]" there is a XineramaScreenInfo*)
NOTE: It looks like we take the exact same code path when Compiz is disabled, and yet we end up with expected behavior there (with a screen that's not too tall). I think we get expected behavior in the No-Compiz case because the window manager constrains our behavior. For example, it completely prevents me (as a user) from dragging a window's title bar behind a panel (the title bar just "hangs behind" my cursor, at the edge of the panel.) Whereas, if i enable Compiz, I'm free to drag title bars behind gnome panels. It seems likely that Firefox's differential behavior in the Compiz-vs-NoCompiz cases is due to a similar restriction imposed by the window manager.
Unassigning, as I'm not sure how to proceed.
Assignee: dholbert → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.