mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
[xutil] Make the request earlier
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
521f7d58be
commit
dba40b0ca4
1 changed files with 8 additions and 7 deletions
|
@ -40,18 +40,19 @@ bool
|
|||
xutil_gettextprop(xcb_connection_t *conn, xcb_window_t w, xcb_atom_t atom,
|
||||
char *text, ssize_t textlen)
|
||||
{
|
||||
xcb_get_property_reply_t *prop_r = NULL;
|
||||
xcb_get_property_cookie_t prop_c;
|
||||
xcb_get_property_reply_t *prop_r;
|
||||
void *prop_val;
|
||||
|
||||
prop_c = xcb_get_property_unchecked(conn, false,
|
||||
w, atom,
|
||||
XCB_GET_PROPERTY_TYPE_ANY,
|
||||
0L, 1000000L);
|
||||
|
||||
if(!text || !textlen)
|
||||
return false;
|
||||
|
||||
prop_r = xcb_get_property_reply(conn,
|
||||
xcb_get_property_unchecked(conn, false,
|
||||
w, atom,
|
||||
XCB_GET_PROPERTY_TYPE_ANY,
|
||||
0L, 1000000L),
|
||||
NULL);
|
||||
prop_r = xcb_get_property_reply(conn, prop_c, NULL);
|
||||
|
||||
|
||||
if(!prop_r || !prop_r->value_len || prop_r->format != 8)
|
||||
|
|
Loading…
Reference in a new issue