[Xcb] How to use xcb_icccm

Micah Nordland mpnordland at gmail.com
Sat Nov 24 13:22:28 PST 2012


I'm looking for an example of how to use the various functions in
xcb_icccm. Specifically how to get the wm name property of a window. I'm
using this code right now:

std::string Window::getWMName()
{
    //xcb_generic_error_t e;
    xcb_icccm_get_text_property_reply_t prop;
    xcb_get_property_cookie_t cookie =
xcb_icccm_get_wm_name_unchecked(globalconf.conn, id);
    xcb_icccm_get_wm_name_reply(globalconf.conn, cookie, &prop, NULL);
    std::string name = prop.name;
    return name;
}

and when I try to out put the name, I get this:
This is the window's name <garbage characters>


-- 
Praising my Savior all the day long,
Micah Nordland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20121124/f0634010/attachment.html>


More information about the Xcb mailing list