aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput/tablet_tool.c
diff options
context:
space:
mode:
authorMarkus Ongyerth <ongy@ongy.net>2018-05-15 16:16:19 +0200
committerMarkus Ongyerth <ongy@ongy.net>2018-07-14 09:43:17 +0200
commit0c9a26828a764ec2648fa1f72178d5df4dd7b36b (patch)
tree8f206642c0b068dc6b06ae8f71570e3dd4f17bd4 /backend/libinput/tablet_tool.c
parentadba68a3c1fb51771342512f570c552a7404cc93 (diff)
Use wlr_list for paths, and improve inert resource handling
Diffstat (limited to 'backend/libinput/tablet_tool.c')
-rw-r--r--backend/libinput/tablet_tool.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c
index 7cecb091..5dc0584c 100644
--- a/backend/libinput/tablet_tool.c
+++ b/backend/libinput/tablet_tool.c
@@ -13,18 +13,6 @@
#include "backend/libinput.h"
#include "util/signal.h"
-//TODO: Move out
-static void add_tablet_path(struct wl_list *list, const char *path) {
- struct wlr_tablet_path *tablet_path = calloc(1, sizeof(struct wlr_tablet_path));
-
- if (!tablet_path) {
- return;
- }
-
- tablet_path->path = strdup(path);
- wl_list_insert(list, &tablet_path->link);
-}
-
struct wlr_libinput_tablet_tool {
struct wlr_tablet_tool_tool wlr_tool;
@@ -91,9 +79,9 @@ struct wlr_tablet_tool *create_libinput_tablet_tool(
}
struct wlr_tablet_tool *wlr_tablet_tool = &libinput_tablet_tool->wlr_tool;
- wl_list_init(&wlr_tablet_tool->paths);
+ wlr_list_init(&wlr_tablet_tool->paths);
struct udev_device *udev = libinput_device_get_udev_device(libinput_dev);
- add_tablet_path(&wlr_tablet_tool->paths, udev_device_get_syspath(udev));
+ wlr_list_push(&wlr_tablet_tool->paths, strdup(udev_device_get_syspath(udev)));
wlr_tablet_tool->name = strdup(libinput_device_get_name(libinput_dev));
wl_list_init(&libinput_tablet_tool->tools);