summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Lulé <pierre@lule.fr>2012-04-16 12:01:56 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2012-04-17 13:31:53 +1000
commit50124d3ddf9bbc4be6734b47a273dbd46b4db0ba (patch)
tree8bae5724c2119b81e407e46dfa12673970ca4868
parentd90003383cbec75da88bf1a88b886b1131597f3f (diff)
Stop coasting when two-finger scroll begins
There is currently a problem that can lead the coasting to continue while scrolling in a particular situation : with Option "VertTwoFingerScroll" "on" Option "CornerCoasting" "0" Option "CoastingSpeed" "10" Option "CoastingFriction" "50" Option "CornerCoasting" "0" If you scroll down with two finger then raise a finger, coasting will start. But if you put down that finger and try to scroll up, the inertia will still scroll down while you scroll up. This can look like a very particular situation, but happens to me often while scrolling in a big document. This (awfully simple) patch stop coasting when detecting two-finger scroll. Signed-off-by: Pierre Lulé <pierre@lule.fr> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/synaptics.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 40478ec..2ea7375 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -2418,6 +2418,7 @@ HandleScrolling(SynapticsPrivate *priv, struct SynapticsHwState *hw,
if (hw->numFingers == 2) {
if (!priv->vert_scroll_twofinger_on &&
(para->scroll_twofinger_vert) && (para->scroll_dist_vert != 0)) {
+ stop_coasting(priv);
priv->vert_scroll_twofinger_on = TRUE;
priv->vert_scroll_edge_on = FALSE;
priv->scroll.last_y = hw->y;
@@ -2425,6 +2426,7 @@ HandleScrolling(SynapticsPrivate *priv, struct SynapticsHwState *hw,
}
if (!priv->horiz_scroll_twofinger_on &&
(para->scroll_twofinger_horiz) && (para->scroll_dist_horiz != 0)) {
+ stop_coasting(priv);
priv->horiz_scroll_twofinger_on = TRUE;
priv->horiz_scroll_edge_on = FALSE;
priv->scroll.last_x = hw->x;