input: support tablet tool pressure range configuration

Needs wlroots 0.20.0.
This commit is contained in:
Jens Peters 2025-07-13 21:38:00 +02:00 committed by Consolatis
parent 9209f611d5
commit 0d049552bc
3 changed files with 33 additions and 0 deletions

View file

@ -1355,6 +1355,12 @@ entry(xmlNode *node, char *nodename, char *content)
} else if (!strcasecmp(nodename, "relativeMotionSensitivity.tabletTool")) {
rc.tablet_tool.relative_motion_sensitivity =
tablet_get_dbl_if_positive(content, "relativeMotionSensitivity");
} else if (!strcasecmp(nodename, "minPressure.tabletTool")) {
rc.tablet_tool.min_pressure =
tablet_get_dbl_if_positive(content, "minPressure");
} else if (!strcasecmp(nodename, "maxPressure.tabletTool")) {
rc.tablet_tool.max_pressure =
tablet_get_dbl_if_positive(content, "maxPressure");
} else if (!strcasecmp(nodename, "ignoreButtonReleasePeriod.menu")) {
rc.menu_ignore_button_release_period = atoi(content);
} else if (!strcasecmp(nodename, "showIcons.menu")) {
@ -1475,6 +1481,8 @@ rcxml_init(void)
tablet_load_default_button_mappings();
rc.tablet_tool.motion = LAB_MOTION_ABSOLUTE;
rc.tablet_tool.relative_motion_sensitivity = 1.0;
rc.tablet_tool.min_pressure = 0.0;
rc.tablet_tool.max_pressure = 1.0;
rc.repeat_rate = 25;
rc.repeat_delay = 600;