mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-05 05:10:26 +01:00
touchpad: add helper function for stopping current actions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
76fce6cddd
commit
7d1a047b7c
1 changed files with 10 additions and 6 deletions
|
|
@ -276,6 +276,14 @@ tp_end_sequence(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
|
|||
tp_end_touch(tp, t, time);
|
||||
}
|
||||
|
||||
static void
|
||||
tp_stop_actions(struct tp_dispatch *tp, uint64_t time)
|
||||
{
|
||||
tp_edge_scroll_stop_events(tp, time);
|
||||
tp_gesture_cancel(tp, time);
|
||||
tp_tap_suspend(tp, time);
|
||||
}
|
||||
|
||||
struct normalized_coords
|
||||
tp_get_delta(struct tp_touch *t)
|
||||
{
|
||||
|
|
@ -1395,9 +1403,7 @@ tp_trackpoint_event(uint64_t time, struct libinput_event *event, void *data)
|
|||
return;
|
||||
|
||||
if (!tp->palm.trackpoint_active) {
|
||||
tp_edge_scroll_stop_events(tp, time);
|
||||
tp_gesture_cancel(tp, time);
|
||||
tp_tap_suspend(tp, time);
|
||||
tp_stop_actions(tp, time);
|
||||
tp->palm.trackpoint_active = true;
|
||||
}
|
||||
|
||||
|
|
@ -1510,9 +1516,7 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data)
|
|||
ARRAY_LENGTH(tp->dwt.mod_mask)))
|
||||
return;
|
||||
|
||||
tp_edge_scroll_stop_events(tp, time);
|
||||
tp_gesture_cancel(tp, time);
|
||||
tp_tap_suspend(tp, time);
|
||||
tp_stop_actions(tp, time);
|
||||
tp->dwt.keyboard_active = true;
|
||||
timeout = DEFAULT_KEYBOARD_ACTIVITY_TIMEOUT_1;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue