aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-11-02 09:53:34 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-11-11 15:50:36 +1000
commit3175a2a96d448a0b2584a58ab3d05fbebb11fab1 (patch)
treec3c319fa9faa71ee06fb85618ef3d84d0a059e70
parentReplace 0/1 button values with enums (diff)
downloadxf86-input-evdev-3175a2a96d448a0b2584a58ab3d05fbebb11fab1.tar.gz
xf86-input-evdev-3175a2a96d448a0b2584a58ab3d05fbebb11fab1.tar.bz2
xf86-input-evdev-3175a2a96d448a0b2584a58ab3d05fbebb11fab1.zip
Print to the log if we find multitouch axes.
No real effect on the code, but it helps to have that line in the log when searching for driver issues. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/evdev.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 4bb55f5..f88074b 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1866,6 +1866,7 @@ EvdevProbe(InputInfoPtr pInfo)
{
int i, has_rel_axes, has_abs_axes, has_keys, num_buttons, has_scroll;
int has_lmr; /* left middle right */
+ int has_mt; /* multitouch */
int ignore_abs = 0, ignore_rel = 0;
EvdevPtr pEvdev = pInfo->private;
int rc = 1;
@@ -1899,6 +1900,7 @@ EvdevProbe(InputInfoPtr pInfo)
has_keys = FALSE;
has_scroll = FALSE;
has_lmr = FALSE;
+ has_mt = FALSE;
num_buttons = 0;
/* count all buttons */
@@ -1966,6 +1968,15 @@ EvdevProbe(InputInfoPtr pInfo)
}
}
+#ifdef MULTITOUCH
+ for (i = ABS_MT_SLOT; i < ABS_MAX; i++) {
+ if (EvdevBitIsSet(pEvdev->abs_bitmask, i)) {
+ has_mt = TRUE;
+ break;
+ }
+ }
+#endif
+
if (ignore_abs && has_abs_axes)
{
xf86IDrvMsg(pInfo, X_INFO, "Absolute axes present but ignored.\n");
@@ -1974,6 +1985,9 @@ EvdevProbe(InputInfoPtr pInfo)
xf86IDrvMsg(pInfo, X_PROBED, "Found absolute axes\n");
pEvdev->flags |= EVDEV_ABSOLUTE_EVENTS;
+ if (has_mt)
+ xf86IDrvMsg(pInfo, X_PROBED, "Found absolute multitouch axes\n");
+
if ((EvdevBitIsSet(pEvdev->abs_bitmask, ABS_X) &&
EvdevBitIsSet(pEvdev->abs_bitmask, ABS_Y))) {
xf86IDrvMsg(pInfo, X_PROBED, "Found x and y absolute axes\n");