[PATCH xf86-input-synaptics v2 5/5] Don't initialize semi-multitouch devices for touch device class
Chase Douglas
chase.douglas at canonical.com
Thu Feb 2 13:19:18 PST 2012
Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
Changes since v1:
* Check if the bit position INPUT_PROP_SEMI_MT is set.
src/eventcomm.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 26c846e..f26aa4f 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -812,10 +812,20 @@ event_query_touch(InputInfoPtr pInfo)
struct eventcomm_proto_data *proto_data = priv->proto_data;
struct mtdev *mtdev;
int i;
+ int rc;
+ uint8_t prop;
priv->num_touches = 0;
priv->num_mt_axes = 0;
+ SYSCALL(rc = ioctl(pInfo->fd, EVIOCGPROP(sizeof(prop)), &prop));
+ if (rc >= 0 && BitIsOn(&prop, INPUT_PROP_SEMI_MT))
+ {
+ xf86IDrvMsg(pInfo, X_INFO,
+ "ignoring touch events for semi-multitouch device\n");
+ return;
+ }
+
mtdev = mtdev_new_open(pInfo->fd);
if (!mtdev)
{
--
1.7.8.3
More information about the xorg-devel
mailing list