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: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1049>
This commit is contained in:
Peter Hutterer 2024-09-13 11:58:26 +10:00
parent 8899800de8
commit 89596e61f8
3 changed files with 10 additions and 10 deletions

View file

@ -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;

View file

@ -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,

View file

@ -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 };