! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
maximization incorrect when screen rotated via xrandr
Status:
RESOLVED: WORKSFORME

Comments

Description edscott editbugs 2005-06-15 03:55:35 CEST
Using rotation done by xserver upon initialization (as with nv driver) works
perfect. Using nvidia driver and accomplishing rotation with "xrandr -o" leaves
xfwm4 with the nonrotated height. This means that upon maximization, the window
is not maximized to the full length of screen. I have deleted display.xml and
all session files and run xfwm4 from outside xfce environment and problem is the
same. I have tested icewm, metacity, oroborus, window-maker, blackbox, fvwm and
afterstep and none of these window managers exhibit the same problem. The bug
might be in an xfce library used by xfwm4 since xfce4-panel and other xfce
programs are also confused about the rotated screen's width and height.

Reproducible: Always
Steps to Reproduce:
1. Use nvidia driver with Options   "RandRRotation" "on"
2. Start X and from terminal run "xrandr -o right"
3. Start xfwm4 and maximize terminal window.

Actual Results:  
See details, above.

Expected Results:  
Maximization should cover the entire screen, as other window manager tested do.


bash-2.05b$ xfwm4 --version
        This is xfwm4 version 4.2.2 for Xfce 4.2.2
        built with GTK+-2.6.7, linked with GTK+-2.6.7.
Comment 1 Olivier Fourdan editbugs 2005-06-15 16:49:00 CEST
That works for me just fine.

xfwm4 --version
        This is xfwm4 version 4.3.0 (revision 15963) for Xfce 4.3.0
        built with GTK+-2.4.14, linked with GTK+-2.4.14.
Comment 2 edscott editbugs 2005-06-16 02:14:17 CEST
Problem remains with:

bash-2.05b$ xfwm4 --version
        This is xfwm4 version 4.3.0 (revision 15963) for Xfce 4.2.2
        built with GTK+-2.6.7, linked with GTK+-2.6.7.

I suppose the libraries may be at fault. I'll update libxfcegui4 and
libxfce4util to version 4.3.0 to-morrow and check again to see if problem
remains or is gone.
Comment 3 edscott editbugs 2005-06-16 13:34:11 CEST

$ xfwm4 --version
        This is xfwm4 version 4.3.0 (revision 15963) for Xfce 4.3.0
        built with GTK+-2.6.7, linked with GTK+-2.6.7.

Problem continues in cvs trunk: Maximization in a 1024x768 display xrandr
rotated to 768x1024 produces maximization to 768x768. Every other window
manager, even oroborus, maximizes to 768x1024.

Comment 4 Olivier Fourdan editbugs 2005-06-16 18:44:13 CEST
I really doubt it for a very simple reason: The environment has nothing to do
with rotate. From a pure logical point of view, rotation is ignored, just the
screen size is meaning full.

I have to ask that again, sorry, but did you log off/log on after removing
.config/xfce4/mcs_settings/display.xml ?

That is the only thing that could explain the problem you describe...
Comment 5 edscott editbugs 2005-06-16 21:36:30 CEST
Yes I deleted display.xml, in fact, I deleted all .config/xfce4/mcs_settings and
also .cache/sessions.

To rule out any interference, I also test run X without xfce environment. As
such, a simple xterm is created with xinit, from there I execute the window
manager of choice (no session, no panel, no nothing). From the xterm I execute
window manager of choice. Each and every window manager I've tested, except for
xfwm4, will maximize correctly. 

As you doubt, I will upload screen shots. One maximizing with xfwm and the other
with fvwm.
Comment 6 edscott editbugs 2005-06-16 21:43:21 CEST
Created attachment 265 
maximization with fvwm
Comment 7 edscott editbugs 2005-06-16 21:45:46 CEST
Created attachment 266 
maximization with xfwm4
Comment 8 Olivier Fourdan editbugs 2005-06-17 19:19:03 CEST
Edscott, can you try this version:

   http://www.xfce.org/~olivier/preview/xfwm4-4.3.0-r16015.tar.bz2

Or even SVN trunk ?

TIA
Olivier.
Comment 9 edscott editbugs 2005-06-18 02:28:40 CEST
Tried SVN trunk:
$ xfwm4 --version
        This is xfwm4 version 4.3.0 (revision 16015) for Xfce 4.3.0
        built with GTK+-2.6.7, linked with GTK+-2.6.7.

But the problem remains (no files present in .config/xfce4/mcs_settings,
executing nothing from xfce4 except xfwm4).

Maybe these warnings I get with CFLAGS="-ggdb -Wunused -Wunused-function
-Wunused-label -Wunused-value -Wunused-variable -Wimplicit -Wall" have something
to do:


$ make >/dev/null
client.c: En la funci
Comment 10 Olivier Fourdan editbugs 2005-06-18 21:03:05 CEST
Edscott, can you try this:

   http://www.xfce.org/~olivier/preview/xfwm4-4.3.0-r16023.tar.bz2

compile, install, etc. Restart it from a terminal

(like "killall xfwm4 && xfwm4&")

Then, when playing with xrandr it should displa ysome info like:

$ xrandr -o left
The size of the screen is now (1024x1280)
The size of the GDK screen is now (1024x1280)
$ xrandr -o normal
The size of the screen is now (1280x1024)
The size of the GDK screen is now (1280x1024)

and post the results here?...
Comment 11 edscott editbugs 2005-06-19 17:32:23 CEST
bash-2.05b$ xfwm4 --version
        This is xfwm4 version 4.3.0 (revision 16023) for Xfce 4.3.0
        built with GTK+-2.6.7, linked with GTK+-2.6.7.
bash-2.05b$ xrandr -o normal
bash-2.05b$ xrandr -o right 

Output:

bash-2.05b$ xfwm4
The size of the screen is now (1024x768)
The size of the GDK screen is now (1024x768)
The size of the screen is now (768x1024)
The size of the GDK screen is now (768x1024)

Apparently xfwm4 does get the correct size, but maximizes only to 768x768. 
Maybe if no "margins" are set with mcs-manager, an incorrect lower margin is used?



Comment 12 Olivier Fourdan editbugs 2005-06-19 21:47:32 CEST
again, same, can you try this one:

   http://www.xfce.org/~olivier/preview/xfwm4-4.3.0-r16030.tar.bz2

launched from a terminal, play with xrandrd and maximization and give the
messages given like:

Max area avail. (x=0, y=0, w=1280; h=988)
Comment 13 Olivier Fourdan editbugs 2005-06-19 21:52:19 CEST
PS: seems that gkrellm is running, can you stop it for the tests?
Comment 14 edscott editbugs 2005-06-20 03:06:46 CEST
Ok. Gkrellm killed. Then, starting out with a rotated display:

bash-2.05b$ xfwm4 --version
        This is xfwm4 version 4.3.0 (revision 16030) for Xfce 4.3.0
        built with GTK+-2.6.7, linked with GTK+-2.6.7.
bash-2.05b$xfwm4
Max area avail. (x=0, y=0, w=768; h=768)

now lets do "xrandr -o normal" and maximize:

The size of the screen is now (1024x768)
The size of the GDK screen is now (1024x768)
Max area avail. (x=0, y=0, w=1024; h=768)

now lets do "xrandr -o right" and maximize:

The size of the screen is now (768x1024)
The size of the GDK screen is now (768x1024)
Max area avail. (x=0, y=0, w=768; h=768)

The value for "h" is incorrect for Max area avail.

Comment 15 Olivier Fourdan editbugs 2005-06-20 17:22:45 CEST
Created attachment 268 
Display current display and screen(s) size

1) Save attachement as "test_display.c"
2) Compile it with
    cc test_display.c -o test_display  `pkg-config --cflags --libs gtk+-2.0`
Comment 16 Olivier Fourdan editbugs 2005-06-20 17:24:18 CEST
Edscott, can you try the attached test program "test_display.c"?
Compile it, run it, change configuration, rerun it and post the results.

TIA,
Olivier.
Comment 17 edscott editbugs 2005-06-21 01:03:08 CEST
Results for test_display does not look correct. Starting with rotation active
under fvwm and then switching to xfwm4:

bash-2.05b$ cc test_display.c -o test_display  `pkg-config --cflags --libs gtk+-
2.0`
bash-2.05b$ ./test_display
Current display has 1 screen(s) :
  - Screen 0, position (0, 0), size (1024, 768)
bash-2.05b$ xrandr -o normal
bash-2.05b$ ./test_display
Current display has 1 screen(s) :
  - Screen 0, position (0, 0), size (1024, 768)
bash-2.05b$ xrandr -o right 
bash-2.05b$ ./test_display
Current display has 1 screen(s) :
  - Screen 0, position (0, 0), size (1024, 768)
bash-2.05b$ xfwm4 &
[1] 24269
bash-2.05b$ ./test_display
Current display has 1 screen(s) :
  - Screen 0, position (0, 0), size (1024, 768)
bash-2.05b$ xrandr -o normal
The size of the screen is now (1024x768)
The size of the GDK screen is now (1024x768)
bash-2.05b$ ./test_display
Current display has 1 screen(s) :
  - Screen 0, position (0, 0), size (1024, 768)
bash-2.05b$ xrandr -o right 
The size of the screen is now (768x1024)
The size of the GDK screen is now (768x1024)
bash-2.05b$ ./test_display
Current display has 1 screen(s) :
  - Screen 0, position (0, 0), size (1024, 768)
Comment 18 Olivier Fourdan editbugs 2005-06-21 20:36:15 CEST
Edscott, this test is independant from the WM. You could eventually run it
ouside of any window manager.

If the values aren't correct, then it's a bug with GTK as stated from the very
first time. xfwm4 and other xfce components rely on gtk for this. That's why the
test is made (very simple pure gtk test)

BTW, I'm running 6.8.2-36 from Fedora dev along with NVIDIA-Linux-x86-1.0-7664
driver and I do not see the problem you mention.
Comment 19 Olivier Fourdan editbugs 2005-06-25 17:03:31 CEST
Closing at it works for me and it's not a bug with Xfce (at best, it's a bug
within the NVidia drivers, at worst, a bug within GTK+)
Comment 20 edscott editbugs 2005-07-02 14:17:44 CEST
The following will return the correct size:

gdk_window_get_geometry  (gdk_get_default_root_window(),
				    NULL,NULL,&root_w,&root_h,NULL);

While the code in test_display.c will not be correct:

gdk_screen_get_monitor_geometry (gscreen, i, &rect);

Maybe xfwm4 needs to use monitor-geometry instead of root-window geometry
because of Xinerama support or something.

I wonder what the Xlib function would return for monitor geometry. Probably
different than the gtk function since different versions of gtk return different
things for you and me.

 
Comment 21 Olivier Fourdan editbugs 2005-07-03 13:01:35 CEST
I don't know, that's a bug in NVidia or in gtk, not in xfce anyway.

Bug #1005

Reported by:
edscott
Reported on: 2005-06-15
Last modified on: 2009-07-14

People

Assignee:
Olivier Fourdan
CC List:
0 users

Version

Attachments

maximization with fvwm (57.82 KB, image/png)
2005-06-16 21:43 CEST , edscott
no flags
maximization with xfwm4 (355.84 KB, image/png)
2005-06-16 21:45 CEST , edscott
no flags
Display current display and screen(s) size (826 bytes, text/x-csrc)
2005-06-20 17:22 CEST , Olivier Fourdan
no flags

Additional information