touchpad: don't try to unhover touches in NONE state
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 29 Mar 2017 00:36:30 +0000 (10:36 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 29 Mar 2017 01:13:23 +0000 (11:13 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-mt-touchpad.c

index 674cf1c..eb950a2 100644 (file)
@@ -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) {