GNOME Bugzilla – Bug 89373
_NET_DESKTOP_LAYOUT always horizontal, x+y switched
Last modified: 2004-12-22 21:47:04 UTC
This is an offshoot of bug 82337. The workspace switcher always sets the _NET_DESKTOP_LAYOUT root property as if it's on a horizontal pager, with the x and y values switched. According to the proposed spec on the wm-spec list, the format for the property is the tuple (horiz/vert, width, height). libwnck sets it as (horiz, height, width). From havoc in bug82337: ------------------------------------------- Let's look at the libwnck code... void _wnck_set_desktop_layout (Screen *xscreen, int rows, int columns) { gulong data[3]; data[0] = _NET_WM_ORIENTATION_HORZ; data[1] = rows; data[2] = columns; _wnck_error_trap_push (); XChangeProperty (gdk_display, RootWindowOfScreen (xscreen), _wnck_atom_get ("_NET_DESKTOP_LAYOUT"), XA_CARDINAL, 32, PropModeReplace, (guchar *)&data, 3); _wnck_error_trap_pop (); } That looks kind of suspicious, it always sets horizontal. And then if you look at pager.c it has a variable named n_rows always passed to this function first, that can be either rows or columns depending on orientation. --------------------------------------------
Created attachment 10206 [details] [review] Hacky patch to fix this - okay to commit ?
yep, thanks
Committed
Umm... looks like only half of this bug got fixed. The X and Y values in _NET_DESKTOP_LAYOUT are still swapped. I can verify that vertical workspace-switchers now work with gnome-panel 2.0.6, though.
Is this still broken?
It's still broken as of debian's libwnck4 package version 0.17-1.
Fixed (again, hopefully)
Well now I'm getting the layout the wrong because metacity isn't spec conforming. I'll attach a patch ... Note: in the patch I haven't actually handled the "starting corner" crack.
Created attachment 11328 [details] [review] Patch to correctly handle _NET_DESKTOP_LAYOUT
Looks good, go ahead and commit the metacity patch. Thanks much.