mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-01 08:10:09 +01:00
gestures: rename tp_gesture_handle_state and tp_gesture_post_gesture
Confusingly, tp_gesture_handle_state() would do almost nothing with our state machine and the various tp_gesture_handle_state_foo() were called later from tp_gesture_post_gesture(). Rename those functions into so that we have tp_gesture_update_finger_state() first followed by tp_gesture_handle_state() which is responsible for dealing with the state machine. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1049>
This commit is contained in:
parent
c9c128f2b1
commit
6b5aeab51e
3 changed files with 5 additions and 5 deletions
|
|
@ -1247,7 +1247,7 @@ tp_gesture_handle_state_pinch(struct tp_dispatch *tp, uint64_t time)
|
|||
}
|
||||
|
||||
static void
|
||||
tp_gesture_post_gesture(struct tp_dispatch *tp, uint64_t time,
|
||||
tp_gesture_handle_state(struct tp_dispatch *tp, uint64_t time,
|
||||
bool ignore_motion)
|
||||
{
|
||||
if (tp->gesture.state == GESTURE_STATE_NONE)
|
||||
|
|
@ -1330,7 +1330,7 @@ tp_gesture_post_events(struct tp_dispatch *tp, uint64_t time,
|
|||
tp_thumb_reset(tp);
|
||||
|
||||
if (tp->gesture.finger_count <= 4)
|
||||
tp_gesture_post_gesture(tp, time, ignore_motion);
|
||||
tp_gesture_handle_state(tp, time, ignore_motion);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1422,7 +1422,7 @@ tp_gesture_finger_count_switch_timeout(uint64_t now, void *data)
|
|||
}
|
||||
|
||||
void
|
||||
tp_gesture_handle_state(struct tp_dispatch *tp, uint64_t time)
|
||||
tp_gesture_update_finger_state(struct tp_dispatch *tp, uint64_t time)
|
||||
{
|
||||
unsigned int active_touches = 0;
|
||||
struct tp_touch *t;
|
||||
|
|
|
|||
|
|
@ -1812,7 +1812,7 @@ tp_process_state(struct tp_dispatch *tp, uint64_t time)
|
|||
tp->buttons.is_clickpad)
|
||||
tp_pin_fingers(tp);
|
||||
|
||||
tp_gesture_handle_state(tp, time);
|
||||
tp_gesture_update_finger_state(tp, time);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -725,7 +725,7 @@ void
|
|||
tp_gesture_cancel_motion_gestures(struct tp_dispatch *tp, uint64_t time);
|
||||
|
||||
void
|
||||
tp_gesture_handle_state(struct tp_dispatch *tp, uint64_t time);
|
||||
tp_gesture_update_finger_state(struct tp_dispatch *tp, uint64_t time);
|
||||
|
||||
void
|
||||
tp_gesture_post_events(struct tp_dispatch *tp, uint64_t time,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue