mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
widget: return self for buttons
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
f43c455035
commit
0b5a681171
2 changed files with 3 additions and 1 deletions
1
mouse.c
1
mouse.c
|
@ -1146,7 +1146,6 @@ luaA_button_array_set(lua_State *L, int idx, button_array_t *buttons)
|
|||
button_ref(b);
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
/** Push an array of button as an Lua table onto the stack.
|
||||
|
|
3
widget.c
3
widget.c
|
@ -396,7 +396,10 @@ luaA_widget_buttons(lua_State *L)
|
|||
button_array_t *buttons = &(*widget)->buttons;
|
||||
|
||||
if(lua_gettop(L) == 2)
|
||||
{
|
||||
luaA_button_array_set(L, 2, buttons);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return luaA_button_array_get(L, buttons);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue