]> git.mdlowis.com Git - proto/labwc.git/commitdiff
input: support tablet tool motion configuration
authorJens Peters <jp7677@gmail.com>
Fri, 5 Jul 2024 04:17:39 +0000 (06:17 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Fri, 19 Jul 2024 21:45:41 +0000 (22:45 +0100)
src/input/tablet.c

index b417ea95c6524e6a23eed9ad765f36feac94b6c8..75f9fd8c6d9d8d922b69208216caccbb2865bb45 100644 (file)
@@ -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);
        }
 
        /*