From 535f92a5466e61bf1f19596498db2c966eac27d7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 25 Nov 2020 13:26:16 +1000 Subject: [PATCH] touchpad: increase the jump detection interval to 30ms On serial touchpads it's common enough that frames slow down tofrom the usual 12ms to 24ms. That's too close to our 25ms cutoff so if we have a minor delay, we end up missing out on jump detection. Fixes #541 Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 1608e793..56ab2ca6 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1534,10 +1534,10 @@ tp_detect_jumps(const struct tp_dispatch *tp, if (tp->device->model_flags & EVDEV_MODEL_TEST_DEVICE) reference_interval = tdelta; - /* If the last frame is more than 25ms ago, we have irregular + /* If the last frame is more than 30ms ago, we have irregular * frames, who knows what's a pointer jump here and what's * legitimate movement.... */ - if (tdelta > 2 * reference_interval || tdelta == 0) + if (tdelta > 2.5 * reference_interval || tdelta == 0) return false; /* We historically expected ~12ms frame intervals, so the numbers