widget: fix element poping

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-07-29 09:39:06 +02:00
parent 15b1b2d7c4
commit 4c3e1cebf8
1 changed files with 3 additions and 1 deletions

View File

@ -184,6 +184,9 @@ widget_geometries(wibox_t *wibox)
} }
else else
{ {
/* Remove the "nil function" */
lua_pop(globalconf.L, 1);
/* If no layout function has been specified, we just push a table with /* If no layout function has been specified, we just push a table with
* geometries onto the stack. These geometries are nothing fancy, they * geometries onto the stack. These geometries are nothing fancy, they
* have x = y = 0 and their height and width set to the widgets demands * have x = y = 0 and their height and width set to the widgets demands
@ -201,7 +204,6 @@ widget_geometries(wibox_t *wibox)
/* remove wibox */ /* remove wibox */
lua_remove(globalconf.L, -2); lua_remove(globalconf.L, -2);
luaA_table2widgets(globalconf.L, widgets); luaA_table2widgets(globalconf.L, widgets);
lua_pop(globalconf.L, 2);
lua_newtable(globalconf.L); lua_newtable(globalconf.L);
for(int i = 0; i < widgets->len; i++) for(int i = 0; i < widgets->len; i++)