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 691426 - get_current_desktop does not interpret property data correctly
get_current_desktop does not interpret property data correctly
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 691836 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-01-09 14:37 UTC by Geoff Reedy
Modified: 2013-03-23 02:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix the problem (934 bytes, patch)
2013-01-09 14:37 UTC, Geoff Reedy
accepted-commit_now Details | Review

Description Geoff Reedy 2013-01-09 14:37:54 UTC
Created attachment 233080 [details] [review]
patch to fix the problem

The property data for _NET_CURRENT_DESKTOP is type CARDINAL32 and should be interpreted as an array of longs but is being interpreted as an array of chars. Notably, this would result in the active desktop almost always being 0 on big-endian systems, but never the right number either. It would also give incorrect results on little-endian systems if the number of desktops exceeds 256. This bug exists at least back to the 3.4 series.
Comment 1 Matthias Clasen 2013-02-13 03:41:28 UTC
Review of attachment 233080 [details] [review]:

Look right.
Comment 2 Federico Mena Quintero 2013-02-27 00:06:10 UTC
Good catch, thanks!  Pushed to gtk-3-6 as commit da7c2d6, and to master as commit c6eddaa.
Comment 3 Matthias Clasen 2013-03-23 02:20:20 UTC
*** Bug 691836 has been marked as a duplicate of this bug. ***