widget: return self for buttons
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
f43c455035
commit
0b5a681171
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);
|
button_ref(b);
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
}
|
}
|
||||||
lua_pop(L, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Push an array of button as an Lua table onto the stack.
|
/** 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;
|
button_array_t *buttons = &(*widget)->buttons;
|
||||||
|
|
||||||
if(lua_gettop(L) == 2)
|
if(lua_gettop(L) == 2)
|
||||||
|
{
|
||||||
luaA_button_array_set(L, 2, buttons);
|
luaA_button_array_set(L, 2, buttons);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
return luaA_button_array_get(L, buttons);
|
return luaA_button_array_get(L, buttons);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue