input-device: drop wlr_input_device.{vendor,product}

These aren't super useful without the bus type. Compositors can
fish back this information from the libinput device if they want to.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3818
This commit is contained in:
Simon Ser 2024-02-29 12:20:55 +01:00 committed by Isaac Freund
parent 11ee3ae5b5
commit edbf8bf2ce
8 changed files with 0 additions and 17 deletions

View File

@ -26,8 +26,6 @@ void init_device_keyboard(struct wlr_libinput_input_device *dev) {
const char *name = get_libinput_device_name(dev->handle);
struct wlr_keyboard *wlr_kb = &dev->keyboard;
wlr_keyboard_init(wlr_kb, &libinput_keyboard_impl, name);
wlr_kb->base.vendor = libinput_device_get_id_vendor(dev->handle);
wlr_kb->base.product = libinput_device_get_id_product(dev->handle);
libinput_device_led_update(dev->handle, 0);
}

View File

@ -11,8 +11,6 @@ void init_device_pointer(struct wlr_libinput_input_device *dev) {
const char *name = get_libinput_device_name(dev->handle);
struct wlr_pointer *wlr_pointer = &dev->pointer;
wlr_pointer_init(wlr_pointer, &libinput_pointer_impl, name);
wlr_pointer->base.vendor = libinput_device_get_id_vendor(dev->handle);
wlr_pointer->base.product = libinput_device_get_id_product(dev->handle);
}
struct wlr_libinput_input_device *device_from_pointer(

View File

@ -11,8 +11,6 @@ void init_device_switch(struct wlr_libinput_input_device *dev) {
const char *name = get_libinput_device_name(dev->handle);
struct wlr_switch *wlr_switch = &dev->switch_device;
wlr_switch_init(wlr_switch, &libinput_switch_impl, name);
wlr_switch->base.vendor = libinput_device_get_id_vendor(dev->handle);
wlr_switch->base.product = libinput_device_get_id_product(dev->handle);
}
struct wlr_libinput_input_device *device_from_switch(

View File

@ -93,8 +93,6 @@ void init_device_tablet_pad(struct wlr_libinput_input_device *dev) {
const char *name = get_libinput_device_name(handle);
struct wlr_tablet_pad *wlr_tablet_pad = &dev->tablet_pad;
wlr_tablet_pad_init(wlr_tablet_pad, &libinput_tablet_pad_impl, name);
wlr_tablet_pad->base.vendor = libinput_device_get_id_vendor(handle);
wlr_tablet_pad->base.product = libinput_device_get_id_product(handle);
wlr_tablet_pad->button_count =
libinput_device_tablet_pad_get_num_buttons(handle);

View File

@ -20,8 +20,6 @@ void init_device_tablet(struct wlr_libinput_input_device *dev) {
const char *name = get_libinput_device_name(dev->handle);
struct wlr_tablet *wlr_tablet = &dev->tablet;
wlr_tablet_init(wlr_tablet, &libinput_tablet_impl, name);
wlr_tablet->base.vendor = libinput_device_get_id_vendor(dev->handle);
wlr_tablet->base.product = libinput_device_get_id_product(dev->handle);
wlr_tablet->usb_vendor_id = libinput_device_get_id_vendor(dev->handle);
wlr_tablet->usb_product_id = libinput_device_get_id_product(dev->handle);

View File

@ -11,8 +11,6 @@ void init_device_touch(struct wlr_libinput_input_device *dev) {
const char *name = get_libinput_device_name(dev->handle);
struct wlr_touch *wlr_touch = &dev->touch;
wlr_touch_init(wlr_touch, &libinput_touch_impl, name);
wlr_touch->base.vendor = libinput_device_get_id_vendor(dev->handle);
wlr_touch->base.product = libinput_device_get_id_product(dev->handle);
libinput_device_get_size(dev->handle, &wlr_touch->width_mm,
&wlr_touch->height_mm);

View File

@ -813,8 +813,6 @@ static void handle_tablet_id(void *data, struct zwp_tablet_v2 *zwp_tablet_v2,
struct wlr_wl_seat *seat = data;
struct wlr_tablet *tablet = &seat->wlr_tablet;
tablet->base.vendor = vid;
tablet->base.product = pid;
tablet->usb_vendor_id = vid;
tablet->usb_product_id = pid;
}

View File

@ -36,12 +36,9 @@ enum wlr_input_device_type {
*
* Input devices are typically advertised by the new_input event in
* struct wlr_backend.
*
* The vendor/product are bus-specific identifiers.
*/
struct wlr_input_device {
enum wlr_input_device_type type;
unsigned int vendor, product;
char *name; // may be NULL
struct {