client: fix key array leak
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
4477dd82ad
commit
c89bec9ff9
1
client.c
1
client.c
|
@ -53,6 +53,7 @@ luaA_client_gc(lua_State *L)
|
|||
client_t *c = luaL_checkudata(L, 1, "client");
|
||||
luaA_ref_array_wipe(&c->refs);
|
||||
button_array_wipe(&c->buttons);
|
||||
key_array_wipe(&c->keys);
|
||||
image_unref(L, c->icon);
|
||||
p_delete(&c->class);
|
||||
p_delete(&c->startup_id);
|
||||
|
|
3
key.c
3
key.c
|
@ -33,13 +33,12 @@
|
|||
|
||||
LUA_OBJECT_FUNCS(keyb_t, key, "key")
|
||||
|
||||
static void
|
||||
void
|
||||
key_unref_simplified(keyb_t **b)
|
||||
{
|
||||
key_unref(globalconf.L, *b);
|
||||
}
|
||||
|
||||
ARRAY_FUNCS(keyb_t *, key, key_unref_simplified)
|
||||
DO_LUA_TOSTRING(keyb_t, key, "key")
|
||||
|
||||
/** Garbage collect a key.
|
||||
|
|
4
key.h
4
key.h
|
@ -40,7 +40,9 @@ typedef struct keyb_t
|
|||
luaA_ref release;
|
||||
} keyb_t;
|
||||
|
||||
ARRAY_TYPE(keyb_t *, key)
|
||||
void key_unref_simplified(keyb_t **);
|
||||
|
||||
DO_ARRAY(keyb_t *, key, key_unref_simplified)
|
||||
|
||||
bool key_press_lookup_string(xcb_keysym_t, char *, ssize_t);
|
||||
xcb_keysym_t key_getkeysym(xcb_keycode_t, uint16_t);
|
||||
|
|
Loading…
Reference in New Issue