From 14baf58e3746bc07c1c290fb673b5723d45eb077 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Jan 2016 17:04:39 +1000 Subject: touchpad: don't try to unhover touches if nothing changed If the touch hasn't updated, the distance hasn't changed so there is no need to unhover. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede --- src/evdev-mt-touchpad.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 6f834fb1..62087fb0 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -743,6 +743,9 @@ tp_unhover_abs_distance(struct tp_dispatch *tp, uint64_t time) for (i = 0; i < tp->ntouches; i++) { t = tp_get_touch(tp, i); + if (!t->dirty) + continue; + if (t->state == TOUCH_HOVERING) { if (t->distance == 0) { /* avoid jumps when landing a finger */ -- cgit v1.2.1