diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-02-04 09:26:57 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-02-21 17:11:32 +0000 |
commit | 71577e351e7954467e2376ac7bb92edc4ce53159 (patch) | |
tree | 5251a9b8bdac59973d28f08892920ad02e05600c /backend/libinput | |
parent | 7d560df90e7ee684dc26306f44a0b3c7f8cf2702 (diff) |
types/wlr_input_device: default vendor and product id to 0
vendor and product id are set when needed by the libinput backend
Diffstat (limited to 'backend/libinput')
-rw-r--r-- | backend/libinput/events.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/backend/libinput/events.c b/backend/libinput/events.c index 67598998..1f28b94a 100644 --- a/backend/libinput/events.c +++ b/backend/libinput/events.c @@ -48,8 +48,6 @@ static struct wlr_input_device *allocate_device( struct wlr_libinput_backend *backend, struct libinput_device *libinput_dev, struct wl_list *wlr_devices, enum wlr_input_device_type type) { - int vendor = libinput_device_get_id_vendor(libinput_dev); - int product = libinput_device_get_id_product(libinput_dev); const char *name = libinput_device_get_name(libinput_dev); struct wlr_libinput_input_device *dev = calloc(1, sizeof(struct wlr_libinput_input_device)); @@ -66,8 +64,9 @@ static struct wlr_input_device *allocate_device( wl_list_insert(wlr_devices, &dev->link); dev->handle = libinput_dev; libinput_device_ref(libinput_dev); - wlr_input_device_init(wlr_dev, type, &input_device_impl, - name, vendor, product); + wlr_input_device_init(wlr_dev, type, &input_device_impl, name); + wlr_dev->vendor = libinput_device_get_id_vendor(libinput_dev); + wlr_dev->product = libinput_device_get_id_product(libinput_dev); return wlr_dev; } |