[PATCH xf86-input-synaptics 08/12] Calculate touch data for semi-mt devices, but don't send touch events

Chase Douglas chase.douglas at canonical.com
Thu Feb 9 18:53:02 PST 2012


Touch data can be used for clickpad processing.

Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
 src/eventcomm.c    |    2 +-
 src/synaptics.c    |    3 +++
 src/synapticsstr.h |    1 +
 3 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/eventcomm.c b/src/eventcomm.c
index 97bb84c..dee7aa3 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -714,7 +714,7 @@ event_query_touch(InputInfoPtr pInfo)
     {
         xf86IDrvMsg(pInfo, X_INFO,
                     "ignoring touch events for semi-multitouch device\n");
-        return;
+        priv->has_semi_mt = TRUE;
     }
 
     if (rc >= 0 && BitIsOn(&prop, INPUT_PROP_BUTTONPAD))
diff --git a/src/synaptics.c b/src/synaptics.c
index 473ce13..e2e23cb 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2659,6 +2659,9 @@ HandleTouches(InputInfoPtr pInfo, struct SynapticsHwState *hw)
             new_active_touches--;
     }
 
+    if (priv->has_semi_mt)
+        goto out;
+
     if (priv->num_active_touches < min_touches &&
         new_active_touches < min_touches)
     {
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index 1ea09a0..3ea30fe 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -269,6 +269,7 @@ typedef struct _SynapticsPrivateRec
     Bool has_pressure;			/* device reports pressure */
     Bool has_width;			/* device reports finger width */
     Bool has_scrollbuttons;		/* device has physical scrollbuttons */
+    Bool has_semi_mt;			/* device is only semi-multitouch capable */
 
     enum TouchpadModel model;		/* The detected model */
     unsigned short id_vendor;		/* vendor id */
-- 
1.7.8.3



More information about the xorg-devel mailing list