From a18bb8e411487ce70cecb3e8956c6409f0219e8c Mon Sep 17 00:00:00 2001 From: Louis Goyard Date: Tue, 12 Mar 2024 00:08:21 +0900 Subject: [PATCH] tablet: move tablet_get_current_tool up for future needs --- src/evdev-tablet.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index c028da9b..75ca81ea 100644 --- a/src/evdev-tablet.c +++ b/src/evdev-tablet.c @@ -1312,6 +1312,18 @@ tablet_get_tool(struct tablet_dispatch *tablet, return tool; } +static struct libinput_tablet_tool * +tablet_get_current_tool(struct tablet_dispatch *tablet) +{ + if (tablet->current_tool.type == LIBINPUT_TOOL_NONE) + return NULL; + + return tablet_get_tool(tablet, + tablet->current_tool.type, + tablet->current_tool.id, + tablet->current_tool.serial); +} + static void tablet_notify_button_mask(struct tablet_dispatch *tablet, struct evdev_device *device, @@ -2061,18 +2073,6 @@ tablet_update_tool_state(struct tablet_dispatch *tablet, return false; } -static struct libinput_tablet_tool * -tablet_get_current_tool(struct tablet_dispatch *tablet) -{ - if (tablet->current_tool.type == LIBINPUT_TOOL_NONE) - return NULL; - - return tablet_get_tool(tablet, - tablet->current_tool.type, - tablet->current_tool.id, - tablet->current_tool.serial); -} - static void tablet_flush(struct tablet_dispatch *tablet, struct evdev_device *device,