[PATCH synaptics 4/5] Don't initialize semi-multitouch devices for touch device class

Chase Douglas chase.douglas at canonical.com
Wed Feb 1 15:50:18 PST 2012


Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
 src/eventcomm.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/eventcomm.c b/src/eventcomm.c
index b9e45e3..4cbdd3e 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -806,10 +806,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 && (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