]> git.mdlowis.com Git - proto/labwc.git/commitdiff
config: add configuration for tablet tool motion sensitivity
authorJens Peters <jp7677@gmail.com>
Fri, 5 Jul 2024 04:32:28 +0000 (06:32 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Fri, 19 Jul 2024 21:45:41 +0000 (22:45 +0100)
include/config/rcxml.h
src/config/rcxml.c

index a6172d83b5b190531f83d43ee76488b2ac16d017..1a2bb203af73c9dcc4a38029e613e1f4ac81b3fd 100644 (file)
@@ -105,6 +105,7 @@ struct rcxml {
        } tablet;
        struct tablet_tool_config {
                enum motion motion;
+               double relative_motion_sensitivity;
        } tablet_tool;
 
        /* libinput */
index fac2cbf15c6ea17d6d1c9b40f93d72e593268447..9ad0268aa82b06a74f0948e70aa4e7fd49fd92ee 100644 (file)
@@ -1063,6 +1063,9 @@ entry(xmlNode *node, char *nodename, char *content)
                }
        } else if (!strcasecmp(nodename, "motion.tabletTool")) {
                rc.tablet_tool.motion = tablet_parse_motion(content);
+       } else if (!strcasecmp(nodename, "relativeMotionSensitivity.tabletTool")) {
+               rc.tablet_tool.relative_motion_sensitivity =
+                       tablet_get_dbl_if_positive(content, "relativeMotionSensitivity");
        } else if (!strcasecmp(nodename, "ignoreButtonReleasePeriod.menu")) {
                rc.menu_ignore_button_release_period = atoi(content);
        } else if (!strcasecmp(nodename, "width.magnifier")) {
@@ -1261,6 +1264,7 @@ rcxml_init(void)
        rc.tablet.box = (struct wlr_fbox){0};
        tablet_load_default_button_mappings();
        rc.tablet_tool.motion = LAB_TABLET_MOTION_ABSOLUTE;
+       rc.tablet_tool.relative_motion_sensitivity = 1.0;
 
        rc.repeat_rate = 25;
        rc.repeat_delay = 600;