Bug 20933

Summary: xpyb: GetProperty returns incorrect value
Product: XCB Reporter: Dwayne Litzenberger <dlitz>
Component: LibraryAssignee: xcb mailing list dummy <xcb>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: getpropdemo.py

Description Dwayne Litzenberger 2009-03-29 10:12:28 UTC
I'm trying to learn XCB via xpyb-1.0, and I noticed what I think is a bug.

I'm trying to get the value of the _NET_SUPPORTED property on the root window.  According to "xprop -root | grep ^_NET_SUPPORTED | cut -d= -f2 | wc -w", there are 76 atoms in my _NET_SUPPORTED.

I have attached a script to get that same list of atoms, but it looks like the (auto-generated) value() method on GetPropertyReply is returning 76 CARD8 values instead of 76 CARD32 values.

I am invoking GetProperty like this:

=== SNIP ===
# Get the _NET_SUPPORTED property
voidcookie = conn.core.GetProperty(
    False,              # delete
    root_window,        # window
    XA_NET_SUPPORTED,   # property
    XA_ATOM,            # type
    0,                  # long_offset
    65535)              # long_length
reply = voidcookie.reply()
=== SNIP ===

The values I get back look like this:

=== SNIP ===
reply.format = 32
reply.type = 1 ('PRIMARY')
reply.bytes_after = 0
reply.value_len = 76
len(reply.value) = 76
reply.value = [74, 1, 0, 0, 126, 1, 0, 0, 36, 1, 0, 0, 79, 1, 0, 0, 80, 1, 0, 0, 81, 1, 0, 0, 35, 1, 0, 0, 130, 1, 0, 0, 89, 1, 0, 0, 128, 1, 0, 0, 129, 1, 0, 0, 91, 1, 0, 0, 131, 1, 0, 0, 132, 1, 0, 0, 43, 1, 0, 0, 90, 1, 0, 0, 42, 1, 0, 0, 137, 1, 0, 0, 40, 1, 0, 0]
=== SNIP ===

Am I doing something wrong?
Comment 1 Dwayne Litzenberger 2009-03-29 10:13:00 UTC
Created attachment 24353 [details]
getpropdemo.py
Comment 2 GitLab Migration User 2019-02-16 19:41:24 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libxcb/issues/25.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.