[Xcb] xcb_get_property use
Barton C Massey
bart at cs.pdx.edu
Sat Oct 31 11:17:44 PDT 2009
IIRC there was a bug in xcb_get_property() that was fixed
recently. Please try again with top-of-tree XCB and let us
know whether your problem persists. Thanks much.
Bart
In message <200910261453.50981.comick at autistici.org> you wrote:
> I'm trying to use the xcb_get_property binding to get the root tile pixmap XID
> in the following manner:
>
> d->conn is an xcb_connection_t and d->screen is a xcb_screen_t *
>
> int i;
> xcb_get_property_cookie_t cookie;
> xcb_get_property_reply_t * reply;
> xcb_atom_t atom;
> const char *props[] = {"_XROOTPMAP_ID", "_XSETROOT_ID"};
>
> xcb_pixmap_t root_tile_pixmap = XCB_NONE;
>
> for (i = 0; i < 2; i++) {
> atom = xcb_atom_get(d->conn, props[i]);
>
> cookie = xcb_get_property(d->conn,
> 0, d->screen->root,
> atom,
> 0L, // is it good ?? i've seen AnyPropertyType in the Xlib
> says 0L
> 0, sizeof (xcb_pixmap_t)
> );
> reply = xcb_get_property_reply(d->conn, cookie, NULL);
> if (reply) { // Is this a good way to check for failure?
> memcpy(&_this.root_tile_pixmap, reply->pad0, sizeof
> (xcb_pixmap_t));//is pad0 the right place where reply data are stored
> }
> free(reply);
> }
> if (root_tile_pixmap == XCB_NONE) {
> // Error
> }else{
> // do stuff the the XID
> }
>
> My reply is always zero lenght.
> Thanks in advance.
>
> --
> Michele Comignano (comick)
> Jabber: comick at autistici.org
> Web: http://comick.playlinux.net
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
More information about the Xcb
mailing list