diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-01-11 16:12:47 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2017-01-26 15:43:02 +1000 |
commit | 3170b3519b869dcd4e304822b0b12a5b31d9deb9 (patch) | |
tree | b7d2aa6d04c11cc33e5be9dbcabb433c942ceccd /src/evdev-mt-touchpad.c | |
parent | 618ee6ac9495297a74059f95ad140928b2ea1fb7 (diff) |
touchpad: ignore hovering touches when tapping
We need to remember whether a tap was down or just hovering, otherwise we mess
up the state machine when we send tap release events for taps that never
switched to TOUCH_BEGIN. This is quick fix, really we should have a new state
here, but that's a lot harder to implement.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/evdev-mt-touchpad.c')
-rw-r--r-- | src/evdev-mt-touchpad.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 56822df..a47c59f 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -214,6 +214,7 @@ tp_new_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) tp_motion_history_reset(t); t->dirty = true; t->has_ended = false; + t->was_down = false; t->state = TOUCH_HOVERING; t->pinned.is_pinned = false; t->millis = time; @@ -226,6 +227,7 @@ tp_begin_touch(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time) t->dirty = true; t->state = TOUCH_BEGIN; t->millis = time; + t->was_down = true; tp->nfingers_down++; t->palm.time = time; t->thumb.state = THUMB_STATE_MAYBE; |