aboutsummaryrefslogtreecommitdiff
path: root/backend
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
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')
-rw-r--r--backend/libinput/tablet_pad.c5
-rw-r--r--backend/wayland/tablet_v2.c2
2 files changed, 5 insertions, 2 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);
diff --git a/backend/wayland/tablet_v2.c b/backend/wayland/tablet_v2.c
index cda65101..34056314 100644
--- a/backend/wayland/tablet_v2.c
+++ b/backend/wayland/tablet_v2.c
@@ -453,7 +453,7 @@ static void handle_pad_added(void *data,
zwp_tablet_pad_v2_destroy(id);
return;
}
- wlr_tablet_pad_init(wlr_dev->tablet_pad, NULL);
+ wlr_tablet_pad_init(wlr_dev->tablet_pad, NULL, wlr_dev->name);
zwp_tablet_pad_v2_add_listener(id, &tablet_pad_listener, dev);
}