Wibox: Unref old widgets table
When setting a new widgets table, the wibox obviously should drop its reference on the old widgets table. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
9114ed1846
commit
74b5cddbac
1
wibox.c
1
wibox.c
|
@ -1450,6 +1450,7 @@ luaA_wibox_set_widgets(lua_State *L, wibox_t *wibox)
|
||||||
}
|
}
|
||||||
/* duplicate table because next function will eat it */
|
/* duplicate table because next function will eat it */
|
||||||
lua_pushvalue(L, -1);
|
lua_pushvalue(L, -1);
|
||||||
|
luaA_object_unref_item(L, -4, wibox->widgets_table);
|
||||||
wibox->widgets_table = luaA_object_ref_item(L, -4, -1);
|
wibox->widgets_table = luaA_object_ref_item(L, -4, -1);
|
||||||
luaA_object_emit_signal(L, -3, "property::widgets", 0);
|
luaA_object_emit_signal(L, -3, "property::widgets", 0);
|
||||||
wibox_need_update(wibox);
|
wibox_need_update(wibox);
|
||||||
|
|
Loading…
Reference in New Issue