GNOME Bugzilla – Bug 384224
wrong size of maximized window with other dock-window present in case of xinerama
Last modified: 2020-01-30 15:05:23 UTC
Please describe the problem: Hardware configuration consists of two monitors. Xinerama is used. There are two screens: - 1024x - 1280x There is gkrellm displayed on 1st screen. It is dock window. Let's assume its width is 20px. Open gnome-terminal and maximize the window on the 1st screen, then its size is 1024px. Open gnome-terminal window on 2nd screen. Maximize it, width is 1260 (width of the screen minus 20). It seems to be a bug of metacity. Correct behaviour should be: - gnome-terminal window width on 1st screen 1004px - gnome-terminal window width on 2nd screen 1280px Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
So you're saying that the unavailable area ("strut") on the first screen is wrongly being applied to the second screen? Does this happen every time?
Yes, it is being applied incorrectly. It does not happen every time. Below I am going to describe two situations but first more info about my configuration. As I said there are two monitors. Xinerama is configured using MergedFB with MergedNonRectangular set to true. This is what xrandr reports: --------------------------- $ xrandr SZ: Pixels Physical Refresh *0 2304 x 1024 ( 780mm x 347mm ) *23 1 1024 x 768 ( 780mm x 347mm ) 60 2 1280 x 1024 ( 780mm x 347mm ) 38 Current rotation - normal Current reflection - none Rotations possible - normal Reflections possible - none --------------------------- As you can see there are three modes. X starts in mode 0, which means that there are two xinerama screens: 1024x and 1280x. 1. First situation is bit different than reported originally. X starts in mode 0 (see xrandr output above). GNOME session starts gkrellm (dock window). gkrellm is put on first screen. When I maximize gnome terminal window on first screen, then its size is 1024x - this is wrong size as gkrellm is visible on this screen. When I move the window to 2nd screen, the size is ok after window maximization - this is different than what is reported in bug originally. 2. Second situation, as described in bug originally, can be reproduced in following way. - start X, gkrellm is on 1st screen, xrandr reports mode 0 - start gnome terminal window on 1st screen and maximize it; size of window is incorrect, of course - run command: $ xrandr -s 1 X changes from xinerama to single head (from lame-user point of view, i do not know how it is solved from technical point of view); this means that 2nd xinerama screen is killed and 2nd monitor displays a mirror of 1st screen in 1024x768 resolution at this point, the gnome terminal window width is still incorrect - now, the tricky part; with 2nd mouse button click gkrellm side frame; gkrellm window is shut (it looks like vertical line) and again click the visible frame to show gkrellm window; what happens is gnome terminal window size is changed to correct size, this is 1004px (screen size minus gkrellm width) - run command: $ xrandr -s 1 this restores 2nd xinerama screen; gnome terminal window on 1st screen is resized to incorrect size - 1024px, should be 1004px as there is gkrellm visible, too - move gnome terminal window to 2nd screen, maximize it - its size on 2nd screen is incorrect, too; there is no gkrellm window and size is 1260px instead of 1280px Additional info: it seems that there is only problem with gkrellm. I am running also gnome panel in right-bottom corner ("Bottom orientation", no expand) - all maximized windows sizes are affected vertically and sizes are correct. If I create a panel with "Left" orientation (no expand), then maximized windows sizes are affected horizontally and everything works nice, too.
I guess I have a problem that could be related. I have a dual screen configuration, with a gnome-panel at the bottom of the first (left side screen). No other panel elsewhere. When a window is open on the second (right side) screen so that its left border touches the left edge of its screen, and when I try to resize it downwards, it gets blocked where the panel starts on the other screen, exactly as if metacity thought that the panel went (maybe 1 pixel) further to the right than where it really is (or maybe it thinks the window goes further to the left than it really does?). Attaching a small drawing of this to be more explicit. This happens on Ubuntu Dapper. The problem looks similar, so I just added a comment here. Tell me if I need to file a separate bug.
Created attachment 88810 [details] Drawing representing the related problem I describe
changing gnome version as the problem still persists in metacity 2.18.5. also, i've tested metacity with RandR 1.2 (latest x.org release). problem with strut applied to wrong display remains.
invalid patch below fixes problem in case of gkrellm: - width of maximized window on 1st display is equal to 1st display width minus gkrellm width - width of maximized window on 2nd display is equal to 2nd display width it causes problem with nautilus though - nautilus icons are placed on 2nd display - should be on 1st display. any hints? ------------------------------------------------ --- src/window.c.orig 2007-09-11 00:42:32.000000000 +0100 +++ src/window.c 2007-09-11 00:46:15.000000000 +0100 @@ -5783,7 +5783,7 @@ temp = g_new (MetaStrut, 1); temp->side = 1 << i; // See MetaDirection def. Matches nicely, eh? - temp->rect = window->screen->rect; + meta_window_get_work_area_current_xinerama(window, &temp->rect); switch (temp->side) { case META_SIDE_RIGHT: ------------------------------------------------