mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
types/wlr_input_device: default vendor and product id to 0
vendor and product id are set when needed by the libinput backend
This commit is contained in:
parent
7d560df90e
commit
71577e351e
8 changed files with 15 additions and 24 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue