After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 89373 - _NET_DESKTOP_LAYOUT always horizontal, x+y switched
_NET_DESKTOP_LAYOUT always horizontal, x+y switched
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
unspecified
Other other
: Normal normal
: GNOME2.x
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks: 82337
 
 
Reported: 2002-07-29 19:52 UTC by Michael Toomim
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
Hacky patch to fix this - okay to commit ? (4.24 KB, patch)
2002-08-02 05:58 UTC, Mark McLoughlin
none Details | Review
Patch to correctly handle _NET_DESKTOP_LAYOUT (5.83 KB, patch)
2002-10-01 05:53 UTC, Mark McLoughlin
none Details | Review

Description Michael Toomim 2002-07-29 19:52:58 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.
--------------------------------------------
Comment 1 Mark McLoughlin 2002-08-02 05:58:35 UTC
Created attachment 10206 [details] [review]
Hacky patch to fix this - okay to commit ?
Comment 2 Havoc Pennington 2002-08-02 15:00:51 UTC
yep, thanks
Comment 3 Mark McLoughlin 2002-08-04 20:19:26 UTC
Committed
Comment 4 Michael Toomim 2002-08-17 03:52:29 UTC
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.
Comment 5 Havoc Pennington 2002-09-17 16:59:18 UTC
Is this still broken?
Comment 6 Michael Toomim 2002-09-21 22:50:01 UTC
It's still broken as of debian's libwnck4 package version 0.17-1.
Comment 7 Havoc Pennington 2002-09-27 18:43:40 UTC
Fixed (again, hopefully)
Comment 8 Mark McLoughlin 2002-10-01 05:52:16 UTC
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.
Comment 9 Mark McLoughlin 2002-10-01 05:53:39 UTC
Created attachment 11328 [details] [review]
Patch to correctly handle _NET_DESKTOP_LAYOUT
Comment 10 Havoc Pennington 2002-10-01 13:09:12 UTC
Looks good, go ahead and commit the metacity patch. Thanks much.