well, I tried what you suggested, and now I either get nothing, or something like this:<div><div>`:N`� </div></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 24, 2012 at 5:59 PM, Michael Stapelberg <span dir="ltr"><<a href="mailto:michael+xcb@stapelberg.de" target="_blank">michael+xcb@stapelberg.de</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Micah,<br>
<div class="im"><br>
Micah Nordland <<a href="mailto:mpnordland@gmail.com">mpnordland@gmail.com</a>> writes:<br>
> std::string Window::getWMName()<br>
> {<br>
>     //xcb_generic_error_t e;<br>
>     xcb_icccm_get_text_property_reply_t prop;<br>
>     xcb_get_property_cookie_t cookie =<br>
> xcb_icccm_get_wm_name_unchecked(globalconf.conn, id);<br>
>     xcb_icccm_get_wm_name_reply(globalconf.conn, cookie, &prop, NULL);<br>
>     std::string name = <a href="http://prop.name" target="_blank">prop.name</a>;<br>
>     return name;<br>
> }<br>
><br>
> and when I try to out put the name, I get this:<br>
> This is the window's name <garbage characters><br>
</div>Without actually testing it, I suspect that you need to consider<br>
name_len as the reply is not NUL-terminated:<br>
<br>
    char *name;<br>
    asprintf(&name, "%.*s", prop.name_len, <a href="http://prop.name" target="_blank">prop.name</a>);<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Best regards,<br>
Michael<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Praising my Savior all the day long,<div>Micah Nordland</div><br>
</div>