[Xcb] xcb_get_property use

Michele Comignano comick at autistici.org
Mon Oct 26 08:47:28 PDT 2009


On Monday 26 October 2009 15:39:52 Julien Danjou wrote:
> In awesome, we use something like:
> xcb_get_property(d->conn, 0, d->screen->root, atom, PIXMAP, 0, 1);
> 
> PIXMAP being xcb_atom_get(d->conn, "PIXMAP") or PIXMAP if you use
> xcb_atom from xcb-util, if I'm correct.
> 
        cookie = xcb_get_property(d->conn,
                0, d->screen->root, atom,
                PIXMAP, 0, 1);
        reply = xcb_get_property_reply(d->conn, cookie, NULL);
        if (reply && reply->type == PIXMAP) {
	    // Upper conditions are OK, so I need to obtain the XID of the pixmap
            memcpy(&root_tile_pixmap, reply->pad0, sizeof (xcb_pixmap_t));
        }

Is this the correct way to obtain the pixmap xid?
The reply looks like ok.

Thanks again :)

-- 
Michele Comignano (comick)
Jabber: comick at autistici.org
Web: http://comick.playlinux.net


More information about the Xcb mailing list