mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-22 12:40:41 +01:00
touchpad: add touch state debugging to the palm and tap state debug logs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
75ca6dcfa3
commit
120d42812e
3 changed files with 18 additions and 2 deletions
|
|
@ -803,8 +803,9 @@ tp_tap_handle_event(struct tp_dispatch *tp,
|
|||
|
||||
if (current != tp->tap.state)
|
||||
evdev_log_debug(tp->device,
|
||||
"tap: touch %d state %s → %s → %s\n",
|
||||
"tap: touch %d (%s), tap state %s → %s → %s\n",
|
||||
t ? (int)t->index : -1,
|
||||
t ? touch_state_to_str(t->state) : "",
|
||||
tap_state_to_str(current),
|
||||
tap_event_to_str(event),
|
||||
tap_state_to_str(tp->tap.state));
|
||||
|
|
|
|||
|
|
@ -1201,8 +1201,9 @@ out:
|
|||
break;
|
||||
}
|
||||
evdev_log_debug(tp->device,
|
||||
"palm: touch %d, palm detected (%s)\n",
|
||||
"palm: touch %d (%s), palm detected (%s)\n",
|
||||
t->index,
|
||||
touch_state_to_str(t->state),
|
||||
palm_state);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,20 @@ enum touch_state {
|
|||
TOUCH_END = 5,
|
||||
};
|
||||
|
||||
static inline const char *
|
||||
touch_state_to_str(enum touch_state state)
|
||||
{
|
||||
switch(state) {
|
||||
CASE_RETURN_STRING(TOUCH_NONE);
|
||||
CASE_RETURN_STRING(TOUCH_HOVERING);
|
||||
CASE_RETURN_STRING(TOUCH_BEGIN);
|
||||
CASE_RETURN_STRING(TOUCH_UPDATE);
|
||||
CASE_RETURN_STRING(TOUCH_MAYBE_END);
|
||||
CASE_RETURN_STRING(TOUCH_END);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
enum touch_palm_state {
|
||||
PALM_NONE = 0,
|
||||
PALM_EDGE,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue