summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2025-06-26 14:40:25 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2025-08-07 10:23:30 +1000
commit5b2a723a02714dd68ccaf3b2145f132b4fa13547 (patch)
tree6b10702797d1f64c332d77404a6b5e67280903f4
parentafd3be9a99d2620e9c2557ae22f32a4bfc6a21e8 (diff)
touchpad: allow disabling palm detection altogether
Also a long-requested configuration option but it's difficult to expose - depending on the touchpad we utilize different palm detection methods and in theory may add to those at any time as we see fit. Disabling it completely via a configuration option is only going to get us more bug reports because *some* palm detection is likely desired on most setups. So let's allow disabling it in a plugin and thus leave any further palm detection code up to the plugin. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1249>
-rw-r--r--src/evdev-mt-touchpad.c8
-rw-r--r--src/libinput-feature.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index a6c330c3..1ddfe409 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -2768,6 +2768,14 @@ tp_interface_disable_feature(struct evdev_dispatch *dispatch,
case LIBINPUT_FEATURE_TOUCHPAD_HYSTERESIS:
tp->hysteresis.enabled = false;
break;
+ case LIBINPUT_FEATURE_TOUCHPAD_PALM_DETECTION:
+ tp->palm.use_mt_tool = false;
+ tp->palm.use_pressure = false;
+ tp->palm.use_size = false;
+ tp->palm.right_edge = INT_MAX;
+ tp->palm.left_edge = INT_MIN;
+ tp->palm.upper_edge = INT_MIN;
+ break;
default:
return;
}
diff --git a/src/libinput-feature.h b/src/libinput-feature.h
index 023e20be..4873645d 100644
--- a/src/libinput-feature.h
+++ b/src/libinput-feature.h
@@ -28,6 +28,7 @@ enum libinput_feature {
LIBINPUT_FEATURE_WHEEL_DEBOUNCING,
LIBINPUT_FEATURE_TOUCHPAD_JUMP_DETECTION,
LIBINPUT_FEATURE_TOUCHPAD_HYSTERESIS,
+ LIBINPUT_FEATURE_TOUCHPAD_PALM_DETECTION,
_LIBINPUT_N_FEATURES
};