[PATCH libinput]=?UTF-8?q?touchpad:=20update=20the=20thumb=20mov?= =?UTF-8?q?e=20timeout=20to=20=C2=B5s?=
Peter Hutterer
peter.hutterer at who-t.net
Tue Jul 28 18:22:59 PDT 2015
And add a #define for it so we stop hiding it.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
300us was enough to pass the test on my laptop, but valgrind on the test VMs
failed them...
src/evdev-mt-touchpad.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index 668a405..ee1612e 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -33,6 +33,7 @@
#define DEFAULT_TRACKPOINT_ACTIVITY_TIMEOUT ms2us(300)
#define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1 ms2us(200)
#define DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_2 ms2us(500)
+#define THUMB_MOVE_TIMEOUT ms2us(300)
#define FAKE_FINGER_OVERFLOW (1 << 7)
static inline int
@@ -700,7 +701,7 @@ tp_thumb_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
t->thumb.state = THUMB_STATE_YES;
else if (t->point.y > tp->thumb.lower_thumb_line &&
tp->scroll.method != LIBINPUT_CONFIG_SCROLL_EDGE &&
- t->thumb.first_touch_time + 300 < time)
+ t->thumb.first_touch_time + THUMB_MOVE_TIMEOUT < time)
t->thumb.state = THUMB_STATE_YES;
/* now what? we marked it as thumb, so:
--
2.4.3
More information about the wayland-devel
mailing list