From a662743610a61df07c6616230e66e78456ecdafb Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Tue, 1 Feb 2022 10:25:28 -0500 Subject: 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. --- backend/libinput/tablet_pad.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'backend/libinput/tablet_pad.c') 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); -- cgit v1.2.3