mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 02:20:05 +01:00
gestures: if 3fg drag fingers are in a nice position, start dragging
Similar to the condition just north of here, if we have 3 fingers in a roughly linear line and 3fg dragging is enabled, assume we're actually trying to drag. This reduces the minimum movement otherwise required to detect the type of gesture. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1042>
This commit is contained in:
parent
1d9e307e2b
commit
bf3a67de6c
1 changed files with 8 additions and 0 deletions
|
|
@ -1302,6 +1302,14 @@ tp_gesture_detect_motion_gestures(struct tp_dispatch *tp, uint64_t time)
|
|||
return;
|
||||
}
|
||||
|
||||
/* If 3fg dragging touches are within a 60x10mm box, start
|
||||
* dragging immediately */
|
||||
if (tp->gesture.finger_count == tp->drag_3fg.nfingers &&
|
||||
distance_mm.x < 60.0 && distance_mm.y < 10.0) {
|
||||
tp_gesture_handle_event(tp, GESTURE_EVENT_3FG_DRAG_START, time);
|
||||
return;
|
||||
}
|
||||
|
||||
/* If one touch exceeds the max_move threshold while the other has not
|
||||
* yet passed the min_move threshold, there is either a resting thumb,
|
||||
* or the user is doing "one-finger-scroll," where one touch stays in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue