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:
Peter Hutterer 2025-11-03 14:47:03 +10:00 committed by Marge Bot
parent 4fe3225050
commit eac44529d8

View file

@ -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);