From 124c112420c6af8b6210920e8400a4267d9bfc3b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 29 Mar 2017 10:36:30 +1000 Subject: [PATCH] touchpad: don't try to unhover touches in NONE state Signed-off-by: Peter Hutterer (cherry picked from commit b4bb28caeb76b76ef00d0fc142f4d5a1ce9b7e59) --- 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 4a8b618d..a24db9c0 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -811,6 +811,9 @@ tp_unhover_pressure(struct tp_dispatch *tp, uint64_t time) for (i = 0; i < (int)tp->num_slots; i++) { t = tp_get_touch(tp, i); + if (t->state == TOUCH_NONE) + continue; + if (t->dirty) { if (t->state == TOUCH_HOVERING) { if (t->pressure >= tp->pressure.high) {