diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2019-06-18 18:24:49 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2019-07-15 13:08:47 +1000 |
commit | 43b910b1dfcddb73e241e17cd73f5b1e7699fe8d (patch) | |
tree | ded689e7a13c2594ffeffc8baaebfd67e31ed10c | |
parent | f1873fae62e02a688e86116b9960a66f0fb489ce (diff) | |
download | libinput-43b910b1dfcddb73e241e17cd73f5b1e7699fe8d.tar.gz |
touchpad: reduce state debugging output by only logging changed states
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/evdev-mt-touchpad-gestures.c | 9 | ||||
-rw-r--r-- | src/evdev-mt-touchpad-tap.c | 13 |
2 files changed, 12 insertions, 10 deletions
diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c index 1a3518e5..eeb3b4cb 100644 --- a/src/evdev-mt-touchpad-gestures.c +++ b/src/evdev-mt-touchpad-gestures.c @@ -642,10 +642,11 @@ tp_gesture_post_gesture(struct tp_dispatch *tp, uint64_t time) tp->gesture.state = tp_gesture_handle_state_pinch(tp, time); - evdev_log_debug(tp->device, - "gesture state: %s → %s\n", - gesture_state_to_str(oldstate), - gesture_state_to_str(tp->gesture.state)); + if (oldstate != tp->gesture.state) + evdev_log_debug(tp->device, + "gesture state: %s → %s\n", + gesture_state_to_str(oldstate), + gesture_state_to_str(tp->gesture.state)); } void diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c index 5255469e..37853b30 100644 --- a/src/evdev-mt-touchpad-tap.c +++ b/src/evdev-mt-touchpad-tap.c @@ -912,12 +912,13 @@ tp_tap_handle_event(struct tp_dispatch *tp, if (tp->tap.state == TAP_STATE_IDLE || tp->tap.state == TAP_STATE_DEAD) tp_tap_clear_timer(tp); - evdev_log_debug(tp->device, - "tap: touch %d state %s → %s → %s\n", - t ? (int)t->index : -1, - tap_state_to_str(current), - tap_event_to_str(event), - tap_state_to_str(tp->tap.state)); + if (current != tp->tap.state) + evdev_log_debug(tp->device, + "tap: touch %d state %s → %s → %s\n", + t ? (int)t->index : -1, + tap_state_to_str(current), + tap_event_to_str(event), + tap_state_to_str(tp->tap.state)); } static bool |