xutil: handle COMPOUND_TEXT blindly
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
77075d7281
commit
a89ceecb1d
|
@ -44,6 +44,7 @@ _NET_WM_STATE_MODAL
|
||||||
_NET_WM_STATE_HIDDEN
|
_NET_WM_STATE_HIDDEN
|
||||||
_NET_WM_STATE_DEMANDS_ATTENTION
|
_NET_WM_STATE_DEMANDS_ATTENTION
|
||||||
UTF8_STRING
|
UTF8_STRING
|
||||||
|
COMPOUND_TEXT
|
||||||
_AWESOME_FLOATING
|
_AWESOME_FLOATING
|
||||||
_AWESOME_FULLSCREEN
|
_AWESOME_FULLSCREEN
|
||||||
_AWESOME_TAGS
|
_AWESOME_TAGS
|
||||||
|
|
|
@ -58,9 +58,11 @@ xutil_text_prop_get(xcb_connection_t *conn, xcb_window_t w, xcb_atom_t atom,
|
||||||
if(text && len)
|
if(text && len)
|
||||||
{
|
{
|
||||||
/* Check whether the returned property value is just an ascii
|
/* Check whether the returned property value is just an ascii
|
||||||
* string or utf8 string. At the moment it doesn't handle
|
* string, an UTF-8 string or just some random multibyte in any other
|
||||||
* COMPOUND_TEXT and multibyte but it's not needed... */
|
* encoding. */
|
||||||
if(reply.encoding == STRING || reply.encoding == UTF8_STRING)
|
if(reply.encoding == STRING
|
||||||
|
|| reply.encoding == UTF8_STRING
|
||||||
|
|| reply.encoding == COMPOUND_TEXT)
|
||||||
{
|
{
|
||||||
*text = p_new(char, reply.name_len + 1);
|
*text = p_new(char, reply.name_len + 1);
|
||||||
/* Use memcpy() because the property name is not be \0
|
/* Use memcpy() because the property name is not be \0
|
||||||
|
|
Loading…
Reference in New Issue