client: wipe class hint struct
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
0c0232e072
commit
4301642ba3
2
client.c
2
client.c
|
@ -1302,11 +1302,13 @@ luaA_client_index(lua_State *L)
|
||||||
if(!xutil_class_hint_get(globalconf.connection, (*c)->win, &hint))
|
if(!xutil_class_hint_get(globalconf.connection, (*c)->win, &hint))
|
||||||
return 0;
|
return 0;
|
||||||
lua_pushstring(L, hint.res_class);
|
lua_pushstring(L, hint.res_class);
|
||||||
|
xutil_class_hint_wipe(&hint);
|
||||||
break;
|
break;
|
||||||
case A_TK_INSTANCE:
|
case A_TK_INSTANCE:
|
||||||
if(!xutil_class_hint_get(globalconf.connection, (*c)->win, &hint))
|
if(!xutil_class_hint_get(globalconf.connection, (*c)->win, &hint))
|
||||||
return 0;
|
return 0;
|
||||||
lua_pushstring(L, hint.res_name);
|
lua_pushstring(L, hint.res_name);
|
||||||
|
xutil_class_hint_wipe(&hint);
|
||||||
break;
|
break;
|
||||||
case A_TK_ROLE:
|
case A_TK_ROLE:
|
||||||
if(!xutil_text_prop_get(globalconf.connection, (*c)->win,
|
if(!xutil_text_prop_get(globalconf.connection, (*c)->win,
|
||||||
|
|
|
@ -100,6 +100,13 @@ typedef struct
|
||||||
char *res_class;
|
char *res_class;
|
||||||
} xutil_class_hint_t;
|
} xutil_class_hint_t;
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
xutil_class_hint_wipe(xutil_class_hint_t *c)
|
||||||
|
{
|
||||||
|
p_delete(&c->res_name);
|
||||||
|
p_delete(&c->res_class);
|
||||||
|
}
|
||||||
|
|
||||||
bool xutil_class_hint_get(xcb_connection_t *, xcb_window_t, xutil_class_hint_t *);
|
bool xutil_class_hint_get(xcb_connection_t *, xcb_window_t, xutil_class_hint_t *);
|
||||||
|
|
||||||
bool xutil_text_prop_get(xcb_connection_t *, xcb_window_t, xcb_atom_t, char **, ssize_t *);
|
bool xutil_text_prop_get(xcb_connection_t *, xcb_window_t, xcb_atom_t, char **, ssize_t *);
|
||||||
|
|
Loading…
Reference in New Issue