|
|
44a568 |
From 2bd942fa6dcaf02c1b825878c3d89badd9319a7f Mon Sep 17 00:00:00 2001
|
|
|
44a568 |
From: Ping Cheng <pinglinux@gmail.com>
|
|
|
44a568 |
Date: Thu, 10 Oct 2013 16:14:29 -0700
|
|
|
44a568 |
Subject: [PATCH 3/3] Decide WCM_LCD by kernel property
|
|
|
44a568 |
|
|
|
44a568 |
kernel 2.6.38 introduced INPUT_PROP_DIRECT to indicate a device is
|
|
|
44a568 |
a direct touch (onscreen pointer) device. Use it so we do not
|
|
|
44a568 |
have to add individual devcies for that feature.
|
|
|
44a568 |
|
|
|
44a568 |
When INPUT_PROP_DIRECT was added, INPUT_PROP_MAX and EVIOCGPROP were
|
|
|
44a568 |
also defined. So, we only need to make sure INPUT_PROP_DIRECT is defined.
|
|
|
44a568 |
|
|
|
44a568 |
Signed-off-by: Ping Cheng <pingc@wacom.com>
|
|
|
44a568 |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
44a568 |
---
|
|
|
44a568 |
src/wcmValidateDevice.c | 9 +++++++++
|
|
|
44a568 |
1 file changed, 9 insertions(+)
|
|
|
44a568 |
|
|
|
44a568 |
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
|
|
|
44a568 |
index 1a5e722..9c0294b 100644
|
|
|
44a568 |
--- a/src/wcmValidateDevice.c
|
|
|
44a568 |
+++ b/src/wcmValidateDevice.c
|
|
|
44a568 |
@@ -308,6 +308,15 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo)
|
|
|
44a568 |
break;
|
|
|
44a568 |
}
|
|
|
44a568 |
|
|
|
44a568 |
+#ifdef INPUT_PROP_DIRECT
|
|
|
44a568 |
+ {
|
|
|
44a568 |
+ unsigned long prop[NBITS(INPUT_PROP_MAX)] = {0};
|
|
|
44a568 |
+
|
|
|
44a568 |
+ ioctl(pInfo->fd, EVIOCGPROP(sizeof(prop)), prop);
|
|
|
44a568 |
+ if (ISBITSET(prop, INPUT_PROP_DIRECT))
|
|
|
44a568 |
+ TabletSetFeature(priv->common, WCM_LCD);
|
|
|
44a568 |
+ }
|
|
|
44a568 |
+#endif
|
|
|
44a568 |
if (ISBITSET(common->wcmKeys, BTN_TOOL_PEN))
|
|
|
44a568 |
TabletSetFeature(priv->common, WCM_PEN);
|
|
|
44a568 |
|
|
|
44a568 |
--
|
|
|
44a568 |
1.8.3.1
|
|
|
44a568 |
|