aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput/tablet_pad.c
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-02-01 10:25:28 -0500
committerKirill Primak <vyivel@eclair.cafe>2022-02-21 17:11:32 +0000
commita662743610a61df07c6616230e66e78456ecdafb (patch)
treebb276de24b0a2633c0a672e331108d1fc2c26d62 /backend/libinput/tablet_pad.c
parent0f3b38365d07bb3e65b5ce2ec265453115276d1d (diff)
types/wlr_tablet_pad: add base wlr_input_device
wlr_tablet_pad owns its wlr_input_device. It will be initialized when the tablet pad is initialized, and finished when the tablet pad is destroyed.
Diffstat (limited to 'backend/libinput/tablet_pad.c')
-rw-r--r--backend/libinput/tablet_pad.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c
index c9ec30ae..2f1da363 100644
--- a/backend/libinput/tablet_pad.c
+++ b/backend/libinput/tablet_pad.c
@@ -75,7 +75,10 @@ struct wlr_tablet_pad *create_libinput_tablet_pad(
wlr_log(WLR_ERROR, "Unable to allocate wlr_tablet_pad");
return NULL;
}
- wlr_tablet_pad_init(wlr_tablet_pad, NULL);
+ const char *name = libinput_device_get_name(libinput_dev);
+ wlr_tablet_pad_init(wlr_tablet_pad, NULL, name);
+ wlr_tablet_pad->base.vendor = libinput_device_get_id_vendor(libinput_dev);
+ wlr_tablet_pad->base.product = libinput_device_get_id_product(libinput_dev);
wlr_tablet_pad->button_count =
libinput_device_tablet_pad_get_num_buttons(libinput_dev);