aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-02-01 11:32:39 -0500
committerKirill Primak <vyivel@eclair.cafe>2022-02-21 17:11:32 +0000
commit7dfee50350180e38c7c02b79c5a3ee454dc552fd (patch)
tree7f051882fbe6dbe1fe08b7eaa343f53698d89806 /backend
parenta662743610a61df07c6616230e66e78456ecdafb (diff)
types/wlr_tablet_tool: add base wlr_input_device
wlr_tablet_tool owns its wlr_input_device. It will be initialized when the tablet tool is initialized, and finished when the tablet tool is destroyed.
Diffstat (limited to 'backend')
-rw-r--r--backend/libinput/tablet_tool.c6
-rw-r--r--backend/wayland/tablet_v2.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c
index 60208a87..31803e81 100644
--- a/backend/libinput/tablet_tool.c
+++ b/backend/libinput/tablet_tool.c
@@ -75,7 +75,11 @@ struct wlr_tablet *create_libinput_tablet(
}
struct wlr_tablet *wlr_tablet = &libinput_tablet->wlr_tablet;
- wlr_tablet_init(wlr_tablet, &tablet_impl);
+ const char *name = libinput_device_get_name(libinput_dev);
+
+ wlr_tablet_init(wlr_tablet, &tablet_impl, name);
+ wlr_tablet->base.vendor = libinput_device_get_id_vendor(libinput_dev);
+ wlr_tablet->base.product = libinput_device_get_id_product(libinput_dev);
struct udev_device *udev = libinput_device_get_udev_device(libinput_dev);
char **dst = wl_array_add(&wlr_tablet->paths, sizeof(char *));
diff --git a/backend/wayland/tablet_v2.c b/backend/wayland/tablet_v2.c
index 34056314..4ddcce07 100644
--- a/backend/wayland/tablet_v2.c
+++ b/backend/wayland/tablet_v2.c
@@ -909,7 +909,7 @@ static void handle_tab_added(void *data,
return;
}
zwp_tablet_v2_set_user_data(id, wlr_dev->tablet);
- wlr_tablet_init(wlr_dev->tablet, NULL);
+ wlr_tablet_init(wlr_dev->tablet, NULL, wlr_dev->name);
zwp_tablet_v2_add_listener(id, &tablet_listener, dev);
}