[PATCH xf86-input-synaptics v2 07/12] Enable clickpad click and drag with two fingers

Chase Douglas chase.douglas at canonical.com
Fri Feb 10 12:00:46 PST 2012


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

diff --git a/src/synaptics.c b/src/synaptics.c
index b4128d6..648404b 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1889,10 +1889,13 @@ HandleTapProcessing(SynapticsPrivate *priv, struct SynapticsHwState *hw,
 	    hw->left = 0;
 	break;
     case TS_CLICKPAD_MOVE:
+	if (hw->numFingers > 1)
+	    hw->numFingers--;
 	SetMovingState(priv, MS_TOUCHPAD_RELATIVE, now);
 	if (!hw->left && !hw->right && !hw->middle) {
 	    SetMovingState(priv, MS_FALSE, now);
 	    SetTapState(priv, TS_MOVE, now);
+	    priv->count_packet_finger = 0;
 	}
 	break;
     }
@@ -2777,6 +2780,14 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw, CARD32 now,
     if (para->touchpad_off == 1)
 	return delay;
 
+    /* If a physical button is pressed on a clickpad, use cumulative touch
+     * movements for motion */
+    if (para->clickpad && (hw->left || hw->right || hw->middle))
+    {
+        hw->x = hw->cumulative_dx;
+        hw->y = hw->cumulative_dy;
+    }
+
     /* apply hysteresis before doing anything serious. This cancels
      * out a lot of noise which might surface in strange phenomena
      * like flicker in scrolling or noise motion. */
-- 
1.7.8.3



More information about the xorg-devel mailing list