mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 04:40:25 +01:00
gestures: do not use thumb for pinch when is used to press the clickpad
The changes made in ca3df8a076 to improve
pinch detection introduced a regression:
When the thumb is used to press the clickpad it is automatically tagged
as thumb and the gesture state machine does not initialize it, leaving
its initial X and Y position set to 0.
When another finger is put on the clickpad, the distance moved by the
thumb is checked and because its initial position is 0 movement is
detected.
Add an additional check to take into account only thumbs that are used
in the gesture.
Fix #708
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
parent
00e0c17688
commit
1262c81d9b
1 changed files with 3 additions and 0 deletions
|
|
@ -1283,6 +1283,9 @@ tp_gesture_thumb_moved(struct tp_dispatch *tp)
|
|||
if (!thumb)
|
||||
return false;
|
||||
|
||||
if (!tp_touch_active_for_gesture(tp, thumb))
|
||||
return false;
|
||||
|
||||
thumb_moved = tp_gesture_mm_moved(tp, thumb);
|
||||
thumb_mm = hypot(thumb_moved.x, thumb_moved.y);
|
||||
return thumb_mm >= PINCH_DISAMBIGUATION_MOVE_THRESHOLD;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue