From 3175a2a96d448a0b2584a58ab3d05fbebb11fab1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 2 Nov 2011 09:53:34 +1000 Subject: 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 --- src/evdev.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') 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"); -- cgit v1.2.3