diff options
author | Simon Ser <contact@emersion.fr> | 2021-07-01 10:09:35 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-07-01 10:35:39 -0400 |
commit | 5888c96da8f76a439ca7c2d2743f0c19a7104d2c (patch) | |
tree | 6ab611defd8a0f6698eb856e2a64cf99dc4c164e /backend/libinput | |
parent | e6cb11d8825c740f6c50e2d04965e86281b83da9 (diff) |
tablet: stop using wlr_list
Diffstat (limited to 'backend/libinput')
-rw-r--r-- | backend/libinput/tablet_pad.c | 3 | ||||
-rw-r--r-- | backend/libinput/tablet_tool.c | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c index 691bb185..c9ec30ae 100644 --- a/backend/libinput/tablet_pad.c +++ b/backend/libinput/tablet_pad.c @@ -85,7 +85,8 @@ struct wlr_tablet_pad *create_libinput_tablet_pad( libinput_device_tablet_pad_get_num_strips(libinput_dev); struct udev_device *udev = libinput_device_get_udev_device(libinput_dev); - wlr_list_push(&wlr_tablet_pad->paths, strdup(udev_device_get_syspath(udev))); + char **dst = wl_array_add(&wlr_tablet_pad->paths, sizeof(char *)); + *dst = strdup(udev_device_get_syspath(udev)); int groups = libinput_device_tablet_pad_get_num_mode_groups(libinput_dev); for (int i = 0; i < groups; ++i) { diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c index a6deeec8..5b867cef 100644 --- a/backend/libinput/tablet_tool.c +++ b/backend/libinput/tablet_tool.c @@ -84,15 +84,18 @@ struct wlr_tablet *create_libinput_tablet( wlr_log(WLR_ERROR, "Unable to allocate wlr_tablet_tool"); return NULL; } + struct wlr_tablet *wlr_tablet = &libinput_tablet->wlr_tablet; + wlr_tablet_init(wlr_tablet, &tablet_impl); - wlr_list_init(&wlr_tablet->paths); struct udev_device *udev = libinput_device_get_udev_device(libinput_dev); - wlr_list_push(&wlr_tablet->paths, strdup(udev_device_get_syspath(udev))); + char **dst = wl_array_add(&wlr_tablet->paths, sizeof(char *)); + *dst = strdup(udev_device_get_syspath(udev)); + wlr_tablet->name = strdup(libinput_device_get_name(libinput_dev)); + wl_list_init(&libinput_tablet->tools); - wlr_tablet_init(wlr_tablet, &tablet_impl); return wlr_tablet; } |