mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
capi.widget: draw only widgets with numeric index
Signed-off-by: Lukas Hrazky <lukkash@email.cz> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
a7c5668a92
commit
ec33544896
1 changed files with 11 additions and 4 deletions
|
@ -107,11 +107,18 @@ luaA_table2widgets(lua_State *L, widget_node_array_t *widgets)
|
|||
{
|
||||
if(lua_istable(L, -1))
|
||||
{
|
||||
lua_pushnil(L);
|
||||
while(luaA_next(L, -2))
|
||||
int i = 1;
|
||||
lua_pushnumber(L, i++);
|
||||
lua_gettable(L, -2);
|
||||
while(!lua_isnil(L, -1))
|
||||
{
|
||||
luaA_table2widgets(L, widgets);
|
||||
/* remove the table */
|
||||
lua_pop(L, 1);
|
||||
lua_pushnumber(L, i++);
|
||||
lua_gettable(L, -2);
|
||||
}
|
||||
|
||||
/* remove the nil and the table */
|
||||
lua_pop(L, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue