[PATCH xf86-input-synaptics v2 3/5] Only move the cursor when one touch is on a touchpad

Chase Douglas chase.douglas at canonical.com
Thu Feb 2 13:19:16 PST 2012


Otherwise, we might post motion events and touch events for the same
physical interaction.

Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
No change since v1

 src/synaptics.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/synaptics.c b/src/synaptics.c
index 907f054..70b7b40 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2014,8 +2014,7 @@ ComputeDeltas(SynapticsPrivate *priv, const struct SynapticsHwState *hw,
 	case TS_1:
 	case TS_3:
 	case TS_5:
-	    if (hw->numFingers == 1)
-		moving_state = MS_TOUCHPAD_RELATIVE;
+	    moving_state = MS_TOUCHPAD_RELATIVE;
 	    break;
 	default:
 	    break;
@@ -2025,7 +2024,8 @@ ComputeDeltas(SynapticsPrivate *priv, const struct SynapticsHwState *hw,
     if (!inside_area || !moving_state || priv->finger_state == FS_BLOCKED ||
 	priv->vert_scroll_edge_on || priv->horiz_scroll_edge_on ||
 	priv->vert_scroll_twofinger_on || priv->horiz_scroll_twofinger_on ||
-	priv->circ_scroll_on || priv->prevFingers != hw->numFingers)
+	priv->circ_scroll_on || priv->prevFingers != hw->numFingers ||
+	(moving_state == MS_TOUCHPAD_RELATIVE && hw->numFingers != 1))
     {
         /* reset packet counter. */
         priv->count_packet_finger = 0;
-- 
1.7.8.3



More information about the xorg-devel mailing list