mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-05 13:29:47 -05:00
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.
This commit is contained in:
parent
0f3b38365d
commit
a662743610
5 changed files with 14 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue