! 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 !
Workspace switcher doesn't recognize screen changes done by xrandr
Status:
RESOLVED: FIXED

Comments

Description Harald Judt 2011-04-18 10:40:19 CEST
Workspace switcher doesn't recognize screen changes done by xrandr.

Steps to reproduce:

1) Start with a single-monitor configuration. For this example, I use the external screen VGA-0 attached to the laptop, while the laptop's LVDS is turned off.

2) `xrandr --output LVDS --auto --below VGA-0' makes the desktop extend to the laptop's LVDS, putting it below the external screen while the panels stay where they are.

Expected results:
Workspace switcher resembles the new screen size in its miniature view.

Actual results:
Workspace switcher still resembles the old screen size in its miniature view and seems not to know about the new screen configuration.

Workaround:
`xfce4-panel -r'
Comment 1 Yves-Alexis Perez editbugs 2011-04-18 13:02:17 CEST
Note that adding or removing a workspace seems to make the pager notice the layout change.
Comment 2 Nick Schermer editbugs 2011-07-28 21:41:21 CEST
*** Bug 7849 has been marked as a duplicate of this bug. ***
Comment 3 Hans Nieser 2012-12-09 23:15:16 CET
I seem to suffer from this bug, except in a different way - and the workaround doesn't work for me. I started using XFCE a few weeks ago and initially I had a single-monitor setup and everything was fine. Then, through xrandr (using the arandr GUI tool), I expanded my desktop to cover the second monitor that I have hooked up, everything was still fine and the workspace switcher reflected that change.

However when I now run an xrandr command to switch back to single-monitor, the workspace switcher doesn't update and keeps taking up space as though I have a dual-monitor setup. Running 'xfce4-panel -r', removing and re-adding the workspace switcher applet, restarting my XFCE session, or using the display settings application to fiddle with things (toggling my 2nd monitor to see if it would case everything to go back to normal) doesn't seem to help either. I've gone over all the settings under the settings editor to see if anything was left behind there but couldn't find anything wrong there either.

So now I'm wondering; is what I'm having the same as this bug, but manifesting in a different way, or should I file a separate bug report for this?
Comment 4 Hans Nieser 2012-12-09 23:17:17 CET
I forgot to mention; adding or removing a workspace doesn't seem to help either, the workspace switcher does update to reflect the new number of workspaces, but each individual workspace is still too wide as though I have two monitors active.
Comment 5 Ashish Myles 2013-02-01 05:29:46 CET
Created attachment 4894 
display the X11 root window property _NET_DESKTOP_GEOMETRY

TL;DR:  The pager itself is (presumably) fine. Xfwm needs to be fixed to update the _NET_DESKTOP_GEOMETRY property.

Long story:
I have the same problem as Hans Nieser. I might have located the source of this bug. The Xfce pager uses libwnck, which uses the _NET_DESKTOP_GEOMETRY property to determine the full desktop size. However, it seems that Xfwm does not update the _NET_DESKTOP_GEOMETRY property
http://standards.freedesktop.org/wm-spec/1.5/ar01s03.html
According to the page above, this property should be set by the window manager. 

I verified that Xfwm indeed does not modify this property using the attached C file, which can be compiled via
    gcc test.c -lX11 -o test

Steps:
1. Log in and enter xfce desktop.
2. Compile test.c and run ./test to verify that the desktop geometry is correct.
3. Change the screen configuration via xrandr by adding/removing a monitor, or change the virtual desktop size via "xrandr --fb widthxheight" (as along as the new size is big enough to hold the existing screen configuration).
4. Run ./test again and observe that the desktop geometry stays unchanged.
Comment 6 Hans Nieser 2013-03-16 15:10:18 CET
(In reply to comment #5)
> Created attachment 4894 
> display the X11 root window property _NET_DESKTOP_GEOMETRY
> 
> TL;DR:  The pager itself is (presumably) fine. Xfwm needs to be fixed to
> update the _NET_DESKTOP_GEOMETRY property.
> 

Thank you for that insight - I finally got enough of this bug so I spent today trying to come up with a patch that I have attached to bug 9922. This fixes the issue that _NET_DESKTOP_GEOMETRY doesn't update, and makes the pager widget relayout correctly.

One minor remaining issue (that I assume has nothing to do with xfwm4) is that I do need to click the pager widget once, or change workspace (or anything that forces it to update itself) to make it relayout correctly immediately after login, but that beats having to restart xfwm4 every time (`xfce-panel -r` never worked for me, btw, not sure why that worked for OP)
Comment 7 Yves-Alexis Perez editbugs 2013-03-16 15:12:09 CET
(In reply to comment #6)
> One minor remaining issue (that I assume has nothing to do with xfwm4) is
> that I do need to click the pager widget once, or change workspace (or
> anything that forces it to update itself) to make it relayout correctly
> immediately after login, but that beats having to restart xfwm4 every time
> (`xfce-panel -r` never worked for me, btw, not sure why that worked for OP)

It was always the case, see comment #1.
Comment 8 Nils Henkel 2014-01-26 17:41:41 CET
I think that I am also suffering from this bug, so I would love to see Hans Nieser's patch in some official release. As far as I can tell, it seems not to be included. Would it be possible to push this somehow?
Comment 9 Simon Steinbeiss editbugs 2014-12-01 19:38:49 CET
Created attachment 5786 
patch to update _NET_DESKTOP_GEOMETRY from monitor/resize events as well (by Hans Nieser)

Moved the patch from bug #9922 over to this one, as the latter is actually a duplicate.
Comment 10 Simon Steinbeiss editbugs 2014-12-01 19:39:32 CET
*** Bug 9922 has been marked as a duplicate of this bug. ***
Comment 11 Hans Nieser 2015-01-08 10:07:21 CET
Created attachment 5851 
properly formatted patch
Comment 12 Olivier Fourdan editbugs 2015-01-08 21:46:39 CET
Pushed, thanks!
Comment 13 Raphael Groner 2015-08-21 20:32:25 CEST
Downstream bug (Fedora 21 and EPEL7 with Xfce 4.10):
https://bugzilla.redhat.com/show_bug.cgi?id=1093998

Bug #7511

Reported by:
Harald Judt
Reported on: 2011-04-18
Last modified on: 2015-08-21
Duplicates (2):
  • 7849 Workspace switcher icon only shows part of desktop after resize
  • 9922 xfwm4 does not update _NET_DESKTOP_GEOMETRY after screen resize (patch included)

People

Assignee:
Olivier Fourdan
CC List:
10 users

Version

Version:
unspecified

Attachments

Additional information