diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-06-27 11:30:51 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2017-07-04 13:43:35 +1000 |
commit | d698de6e68b10ea9d394465688db2a9731e5f9cd (patch) | |
tree | 26e8b933250882b3c385fab216c61a94e7a741f4 /src/evdev-mt-touchpad-buttons.c | |
parent | 7c983d6088fe5098f3236b1400d98dbbf92712df (diff) | |
download | libinput-d698de6e68b10ea9d394465688db2a9731e5f9cd.tar.gz |
touchpad: send a left button event when we move out of topbuttons and click
We used to completely ignore a finger that was within the top software button
area and then moved to the main area and remained there for a timeout. This
avoids erroneous pointer movements when the user moves the finger while using
the trackpoint.
But we also ignored physical clicks, something we should not be doing. This
patch fixes that behavior: we still ignore the finger for movement, but a
physical click now triggers a left click once we've been in the area for the
timeout.
This new behavior doesn't apply within the timeout, i.e. if a finger is in the
right top button area, moves out and immediately clicks, we still trigger a
right click. This avoids erroneous switches to left-clicks when the finger is
at the edge of the button area and moves out during the press.
Related to: https://bugs.freedesktop.org/show_bug.cgi?id=99212
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/evdev-mt-touchpad-buttons.c')
-rw-r--r-- | src/evdev-mt-touchpad-buttons.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c index c437ddf2..83a38c2b 100644 --- a/src/evdev-mt-touchpad-buttons.c +++ b/src/evdev-mt-touchpad-buttons.c @@ -405,7 +405,10 @@ tp_button_ignore_handle_event(struct tp_dispatch *tp, tp_button_set_state(tp, t, BUTTON_STATE_NONE, event); break; case BUTTON_EVENT_PRESS: + t->button.curr = BUTTON_EVENT_IN_AREA; + break; case BUTTON_EVENT_RELEASE: + break; case BUTTON_EVENT_TIMEOUT: break; } |