From: Peter Hutterer Date: Tue, 10 Sep 2024 03:00:36 +0000 (+1000) Subject: gestures: rename tp_gesture_handle_state and tp_gesture_post_gesture X-Git-Tag: 1.27.0~119 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b5aeab51e22c0660b300043b81adbfcd8e13d27;p=platform%2Fupstream%2Flibinput.git 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: --- diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c index 5204dc74..7e52ecb8 100644 --- a/src/evdev-mt-touchpad-gestures.c +++ b/src/evdev-mt-touchpad-gestures.c @@ -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; diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 9bc6bf6a..9c219a68 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -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 diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h index 55547014..d2842651 100644 --- a/src/evdev-mt-touchpad.h +++ b/src/evdev-mt-touchpad.h @@ -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,