mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-09 05:10:15 +01:00
touchpad: always call into the the tap state machine
A button event consumed by the softbutton or clickpad code does not feed into the tap state machine, leaving it in its current state. The touch generating that event however may have triggered state changes. For some tap/click combinations this gives us either double press/release events or an inconsistent order of events. Those issues include: * a really short physical click causes a click + tap-click * a really short physical click on the right software button causes a right click + left tap-click * tap + click causes double button left press events To avoid these, notify the tap code that a button event has occured and process that accordingly. Depending on the state this may either continue to the DEAD state or release the current tap button and then go to the DEAD state. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
4ddd19d6bd
commit
fc51daff73
1 changed files with 4 additions and 5 deletions
|
|
@ -545,13 +545,12 @@ tp_post_events(struct tp_dispatch *tp, uint64_t time)
|
|||
{
|
||||
struct tp_touch *t = tp_current_touch(tp);
|
||||
double dx, dy;
|
||||
int consumed = 0;
|
||||
|
||||
if (tp_post_button_events(tp, time) != 0) {
|
||||
tp_stop_scroll_events(tp, time);
|
||||
return;
|
||||
}
|
||||
consumed |= tp_tap_handle_state(tp, time);
|
||||
consumed |= tp_post_button_events(tp, time);
|
||||
|
||||
if (tp_tap_handle_state(tp, time) != 0) {
|
||||
if (consumed) {
|
||||
tp_stop_scroll_events(tp, time);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue