gestures: log a bug if we're trying to reset an actual gesture
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 12 Sep 2024 08:47:36 +0000 (18:47 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 4 Oct 2024 05:13:23 +0000 (15:13 +1000)
Now that end/cancel are separate states, we shouldn't get here.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1049>

src/evdev-mt-touchpad-gestures.c

index 5b656789a391a68a35d2fd72dfc177c6d595e7e8..0ade3b61a30d11fb9b4c7473bf4b820f7f39a692 100644 (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);