mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-31 10:00:09 +01:00
lua: return an empty table as device info after device removal
As the documentation already promises. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1354>
This commit is contained in:
parent
4fe3225050
commit
eac44529d8
1 changed files with 3 additions and 0 deletions
|
|
@ -692,6 +692,9 @@ evdevdevice_info(lua_State *L)
|
|||
|
||||
lua_newtable(L); /* { bustype: ..., vid: ..., pid: ..., name: ... } */
|
||||
|
||||
if (device->evdev == NULL)
|
||||
return 1;
|
||||
|
||||
lua_pushinteger(L, device->bustype);
|
||||
lua_setfield(L, -2, "bustype");
|
||||
lua_pushinteger(L, device->vid);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue