From: Peter Hutterer Date: Fri, 13 Sep 2024 01:58:26 +0000 (+1000) Subject: gestures: rename gesture_notify_hold to gesture_notify_hold_begin() X-Git-Tag: 1.27.0~112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89596e61f8538465e4af80c082eaf6b511d2832a;p=platform%2Fupstream%2Flibinput.git gestures: rename gesture_notify_hold to gesture_notify_hold_begin() HOLD gestures only have begin/end so let's rename this so it's immediately obvious which one we're sending. notify_swipe/pinch pass the event type in so it's clear that it's a BEGIN vs an UPDATE. Part-of: --- diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c index f5dc920e..161b1210 100644 --- a/src/evdev-mt-touchpad-gestures.c +++ b/src/evdev-mt-touchpad-gestures.c @@ -607,8 +607,8 @@ tp_gesture_handle_event_on_state_unknown(struct tp_dispatch *tp, break; case GESTURE_EVENT_HOLD_TIMEOUT: tp->gesture.state = GESTURE_STATE_HOLD; - gesture_notify_hold(&tp->device->base, time, - tp->gesture.finger_count); + gesture_notify_hold_begin(&tp->device->base, time, + tp->gesture.finger_count); tp_gesture_start(tp, time); break; case GESTURE_EVENT_POINTER_MOTION_START: @@ -748,8 +748,8 @@ tp_gesture_handle_event_on_state_pointer_motion(struct tp_dispatch *tp, if (first_mm < HOLD_AND_MOTION_THRESHOLD) { tp->gesture.state = GESTURE_STATE_HOLD_AND_MOTION; - gesture_notify_hold(&tp->device->base, time, - tp->gesture.finger_count); + gesture_notify_hold_begin(&tp->device->base, time, + tp->gesture.finger_count); tp_gesture_start(tp, time); } break; diff --git a/src/libinput-private.h b/src/libinput-private.h index dff0aaae..3038d155 100644 --- a/src/libinput-private.h +++ b/src/libinput-private.h @@ -752,9 +752,9 @@ gesture_notify_pinch_end(struct libinput_device *device, bool cancelled); void -gesture_notify_hold(struct libinput_device *device, - uint64_t time, - int finger_count); +gesture_notify_hold_begin(struct libinput_device *device, + uint64_t time, + int finger_count); void gesture_notify_hold_end(struct libinput_device *device, diff --git a/src/libinput.c b/src/libinput.c index 42a58d39..76e7235e 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -3111,9 +3111,9 @@ gesture_notify_pinch_end(struct libinput_device *device, } void -gesture_notify_hold(struct libinput_device *device, - uint64_t time, - int finger_count) +gesture_notify_hold_begin(struct libinput_device *device, + uint64_t time, + int finger_count) { const struct normalized_coords zero = { 0.0, 0.0 };