From 3afe8bc9145a7af1c49a56f1e2ce9c5eeded6480 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 1 Mar 2017 13:42:09 +1000 Subject: [PATCH] touchpad: add touchpad pressure state debugging to debug output Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 4a8b618d..674cf1c3 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -814,13 +814,18 @@ tp_unhover_pressure(struct tp_dispatch *tp, uint64_t time) if (t->dirty) { if (t->state == TOUCH_HOVERING) { if (t->pressure >= tp->pressure.high) { + evdev_log_debug(tp->device, + "pressure: begin touch\n"); /* avoid jumps when landing a finger */ tp_motion_history_reset(t); tp_begin_touch(tp, t, time); } } else { - if (t->pressure < tp->pressure.low) + if (t->pressure < tp->pressure.low) { + evdev_log_debug(tp->device, + "pressure: end touch\n"); tp_end_touch(tp, t, time); + } } }