mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-26 06:20:12 +01:00
gestures: always save touch information
When a single touch is used to hold or to move the pointer, save information about the touch. Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
parent
5603ed867d
commit
13c47598bc
1 changed files with 6 additions and 3 deletions
|
|
@ -979,10 +979,16 @@ tp_gesture_handle_state_none(struct tp_dispatch *tp, uint64_t time)
|
|||
|
||||
ntouches = tp_gesture_get_active_touches(tp, touches, 4);
|
||||
|
||||
first = touches[0];
|
||||
second = touches[1];
|
||||
|
||||
if (ntouches == 0)
|
||||
return;
|
||||
|
||||
if (ntouches == 1) {
|
||||
first->gesture.initial = first->point;
|
||||
tp->gesture.touches[0] = first;
|
||||
|
||||
tp_gesture_handle_event(tp,
|
||||
GESTURE_EVENT_FINGER_DETECTED,
|
||||
time);
|
||||
|
|
@ -996,9 +1002,6 @@ tp_gesture_handle_state_none(struct tp_dispatch *tp, uint64_t time)
|
|||
return;
|
||||
}
|
||||
|
||||
first = touches[0];
|
||||
second = touches[1];
|
||||
|
||||
/* For 3+ finger gestures, we only really need to track two touches.
|
||||
* The human hand's finger arrangement means that for a pinch, the
|
||||
* bottom-most touch will always be the thumb, and the top-most touch
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue