tablet: log a bug when a tablet switches between tools directly
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 1 Apr 2019 05:29:37 +0000 (15:29 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 4 Apr 2019 05:51:34 +0000 (05:51 +0000)
commitca1a75a961ff36ec0b6dd4e80cf2e3048be2b923
treea18f62dd6388d76451446528f71e36ce8e54fa5f
parent4912e7ed4acb4783ddb14994abef974194eecf89
tablet: log a bug when a tablet switches between tools directly

We expect the kernel to transition properly for us, e.g. BTN_TOOL_PEN goes to
0, BTN_TOOL_ERASER goes to 1. Two cases have surfaced recently where this
doesn't happen and debugging this takes time - so let's warn about it to make
it obvious.

Example 1: https://github.com/linuxwacom/libwacom/issues/70
Example 2: https://gitlab.freedesktop.org/libinput/libinput/issues/259

This is just a warning, nothing more. We should just handle that case
accordingly but that requires more effort.

Fixes #260

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-tablet.c
src/evdev-tablet.h
test/test-tablet.c