WnckScreen doesn't update virtual desktop size if there's two+ virtual desktops bigger than the screen
Submitted by ShadowKyogre
Steps to reproduce:
- Set the number of desktops to 1 in a window manager that supports viewports AND more than one desktop.
- Run something like the following in a wnck application and print out the resulting number: wnck_workspace_get_width(workspace); // or height
- It should report that the requested dimension is greater than the screen.
- Set the number of desktops to some number greater than one.
- Repeat #2.
Expected result: It should report that the workspace is bigger than the screen. Actual result: It doesn't, all because of that n_coord == 2 line in the update_viewport_settings function in screen.c. Checking if n_coord is greater than or is 2 and grabbing the appropriate pair of geometry numbers would fix this.
Results from xprop that also support this issue from my virtual machine: #with two virtual desktops with 4 viewports: [root@ninit-box Compiz-Boxmenu]# xprop -display "$DISPLAY" _NET_DESKTOP_GEOMETRY _NET_DESKTOP_GEOMETRY(CARDINAL) = 5112, 709, 5112, 709 #with one virtual desktops with 4 viewports: [root@ninit-box Compiz-Boxmenu]# xprop -display "$DISPLAY" _NET_DESKTOP_GEOMETRY _NET_DESKTOP_GEOMETRY(CARDINAL) = 5112, 709
As soon as I can, I'll try writing a patch to upload with this issue.