touchpad: only log edge scroll state changes when the state actually changes
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 10 Jul 2019 01:56:52 +0000 (11:56 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 15 Jul 2019 03:08:47 +0000 (13:08 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-mt-touchpad-edge-scroll.c

index 4675b4f..25e92a6 100644 (file)
@@ -260,12 +260,13 @@ tp_edge_scroll_handle_event(struct tp_dispatch *tp,
                break;
        }
 
-       evdev_log_debug(tp->device,
-                       "edge-scroll: touch %d state %s → %s → %s\n",
-                       t->index,
-                       edge_state_to_str(current),
-                       edge_event_to_str(event),
-                       edge_state_to_str(t->scroll.edge_state));
+       if (current != t->scroll.edge_state)
+               evdev_log_debug(tp->device,
+                               "edge-scroll: touch %d state %s → %s → %s\n",
+                               t->index,
+                               edge_state_to_str(current),
+                               edge_event_to_str(event),
+                               edge_state_to_str(t->scroll.edge_state));
 }
 
 static void