[xf86-input-synaptics,v3,06/10] Disable scrolling when beginning a clickpad press

Submitted by Chase Douglas on Feb. 23, 2012, 9:02 p.m.

Details

Message ID 1330030945-573-7-git-send-email-chase.douglas@canonical.com
State Accepted
Commit a6361e2d2c093c4170bab63307526702fe9903ad
Headers show

Not browsing as part of any series.

Commit Message

Chase Douglas Feb. 23, 2012, 9:02 p.m.
There really isn't a point to scrolling while a clickpad is pressed. In
particular, the clickpad button areas and the horizontal edge scrolling
areas overlap, so horizontal edge scrolling must be disabled. Also,
performing two finger scrolling while a third finger presses the button
would require us to inhibit touch events until four touches are present.
That is enough reason to disable two finger scrolling as well.

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

Patch hide | download patch | download mbox

diff --git a/src/synaptics.c b/src/synaptics.c
index c63937d..58fc02c 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1847,6 +1847,12 @@  HandleTapProcessing(SynapticsPrivate *priv, struct SynapticsHwState *hw,
 	}
 	break;
     case TS_CLICKPAD_MOVE:
+	/* Disable scrolling once a button is pressed on a clickpad */
+	priv->vert_scroll_edge_on = FALSE;
+	priv->horiz_scroll_edge_on = FALSE;
+	priv->vert_scroll_twofinger_on = FALSE;
+	priv->horiz_scroll_twofinger_on = FALSE;
+
         /* Assume one touch is only for holding the clickpad button down */
 	if (hw->numFingers > 1)
 	    hw->numFingers--;