From e5ed094ee5c6654834ec033d2976eba7e06bb63f Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Fri, 5 Jul 2024 06:17:39 +0200 Subject: [PATCH] input: support tablet tool motion configuration --- src/input/tablet.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/input/tablet.c b/src/input/tablet.c index e84f615d..66a27454 100644 --- a/src/input/tablet.c +++ b/src/input/tablet.c @@ -20,7 +20,7 @@ #include "action.h" static enum motion -tool_motion_mode(struct wlr_tablet_tool *tool) +tool_motion_mode(enum motion motion, struct wlr_tablet_tool *tool) { /* * Absolute positioning doesn't make sense @@ -31,7 +31,7 @@ tool_motion_mode(struct wlr_tablet_tool *tool) case WLR_TABLET_TOOL_TYPE_LENS: return LAB_TABLET_MOTION_RELATIVE; default: - return LAB_TABLET_MOTION_ABSOLUTE; + return motion; } } @@ -235,7 +235,8 @@ handle_proximity(struct wl_listener *listener, void *data) struct drawing_tablet_tool *tool = ev->tool->data; if (ev->state == WLR_TABLET_TOOL_PROXIMITY_IN) { - tablet->motion_mode = tool_motion_mode(ev->tool); + tablet->motion_mode = + tool_motion_mode(rc.tablet_tool.motion, ev->tool); } /*