touchpad: print event type on state machine error
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 12 Dec 2014 01:21:05 +0000 (11:21 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 12 Dec 2014 02:00:35 +0000 (12:00 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-mt-touchpad-edge-scroll.c

index 0ac819433b5523a3f9346cac3cf5be1ec3a54cfa..616080faecdd4b9c2bd9c8e2b42340a877fc1f2b 100644 (file)
@@ -113,7 +113,8 @@ tp_edge_scroll_handle_none(struct tp_dispatch *tp,
        case SCROLL_EVENT_TIMEOUT:
        case SCROLL_EVENT_POSTED:
                log_bug_libinput(libinput,
-                                "unexpected scroll event in none state\n");
+                                "unexpected scroll event %d in none state\n",
+                                event);
                break;
        }
 }
@@ -128,7 +129,8 @@ tp_edge_scroll_handle_edge_new(struct tp_dispatch *tp,
        switch (event) {
        case SCROLL_EVENT_TOUCH:
                log_bug_libinput(libinput,
-                                "unexpected scroll event in edge new state\n");
+                                "unexpected scroll event %d in edge new state\n",
+                                event);
                break;
        case SCROLL_EVENT_MOTION:
                t->scroll.edge &= tp_touch_get_edge(tp, t);
@@ -157,7 +159,8 @@ tp_edge_scroll_handle_edge(struct tp_dispatch *tp,
        case SCROLL_EVENT_TOUCH:
        case SCROLL_EVENT_TIMEOUT:
                log_bug_libinput(libinput,
-                                "unexpected scroll event in edge state\n");
+                                "unexpected scroll event %d in edge state\n",
+                                event);
                break;
        case SCROLL_EVENT_MOTION:
                /* If started at the bottom right, decide in which dir to scroll */
@@ -188,7 +191,8 @@ tp_edge_scroll_handle_area(struct tp_dispatch *tp,
        case SCROLL_EVENT_TIMEOUT:
        case SCROLL_EVENT_POSTED:
                log_bug_libinput(libinput,
-                                "unexpected scroll event in area state\n");
+                                "unexpected scroll event %d in area state\n",
+                                event);
                break;
        case SCROLL_EVENT_MOTION:
                break;