[PATCH libinput 2/3] touchpad: enable hysteresis based on a 0 fuzz value

Peter Hutterer peter.hutterer at who-t.net
Mon Mar 5 04:38:01 UTC 2018


If the fuzz is 0, assume we don't need hysteresis and use the wobble detection
code instead. If the fuzz is non-zero, enable it by default.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-mt-touchpad.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index 0cd3e79d..aaad9f5d 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -3109,7 +3109,9 @@ tp_init_hysteresis(struct tp_dispatch *tp)
 
 	tp->hysteresis.margin.x = xmargin;
 	tp->hysteresis.margin.y = ymargin;
-	tp->hysteresis.enabled = false;
+	tp->hysteresis.enabled = (ax->fuzz || ay->fuzz);
+	if (tp->hysteresis.enabled)
+		evdev_log_debug(tp->device, "hysteresis enabled\n");
 }
 
 static void
-- 
2.14.3



More information about the wayland-devel mailing list