mirror of
https://github.com/swaywm/sway.git
synced 2026-03-21 05:33:56 -04:00
Fetch input device vendor/product from libinput
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4582
This commit is contained in:
parent
59f6292383
commit
f2a0e81b24
2 changed files with 13 additions and 6 deletions
|
|
@ -1097,10 +1097,6 @@ json_object *ipc_json_describe_input(struct sway_input_device *device) {
|
|||
json_object_new_string(device->identifier));
|
||||
json_object_object_add(object, "name",
|
||||
json_object_new_string(device->wlr_device->name));
|
||||
json_object_object_add(object, "vendor",
|
||||
json_object_new_int(device->wlr_device->vendor));
|
||||
json_object_object_add(object, "product",
|
||||
json_object_new_int(device->wlr_device->product));
|
||||
json_object_object_add(object, "type",
|
||||
json_object_new_string(
|
||||
input_device_get_type(device)));
|
||||
|
|
@ -1154,6 +1150,10 @@ json_object *ipc_json_describe_input(struct sway_input_device *device) {
|
|||
libinput_dev = wlr_libinput_get_device_handle(device->wlr_device);
|
||||
json_object_object_add(object, "libinput",
|
||||
describe_libinput_device(libinput_dev));
|
||||
json_object_object_add(object, "vendor",
|
||||
json_object_new_int(libinput_device_get_id_vendor(libinput_dev)));
|
||||
json_object_object_add(object, "product",
|
||||
json_object_new_int(libinput_device_get_id_product(libinput_dev)));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue