gestures: log a bug if we're trying to reset an actual gesture

Now that end/cancel are separate states, we shouldn't get here.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1049>
This commit is contained in:
Peter Hutterer 2024-09-12 18:47:36 +10:00
parent 942fd0dc8f
commit c1690d408a

View file

@ -644,6 +644,8 @@ tp_gesture_handle_event_on_state_hold(struct tp_dispatch *tp,
{
switch(event) {
case GESTURE_EVENT_RESET:
log_gesture_bug(tp, event);
break;
case GESTURE_EVENT_END:
case GESTURE_EVENT_CANCEL:
libinput_timer_cancel(&tp->gesture.hold_timer);
@ -687,6 +689,8 @@ tp_gesture_handle_event_on_state_hold_and_motion(struct tp_dispatch *tp,
{
switch(event) {
case GESTURE_EVENT_RESET:
log_gesture_bug(tp, event);
break;
case GESTURE_EVENT_END:
case GESTURE_EVENT_CANCEL:
libinput_timer_cancel(&tp->gesture.hold_timer);
@ -789,6 +793,8 @@ tp_gesture_handle_event_on_state_pinch(struct tp_dispatch *tp,
{
switch(event) {
case GESTURE_EVENT_RESET:
log_gesture_bug(tp, event);
break;
case GESTURE_EVENT_END:
case GESTURE_EVENT_CANCEL:
libinput_timer_cancel(&tp->gesture.hold_timer);
@ -816,6 +822,8 @@ tp_gesture_handle_event_on_state_swipe(struct tp_dispatch *tp,
{
switch(event) {
case GESTURE_EVENT_RESET:
log_gesture_bug(tp, event);
break;
case GESTURE_EVENT_END:
case GESTURE_EVENT_CANCEL:
libinput_timer_cancel(&tp->gesture.hold_timer);