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é <[email protected]>
---
 src/synaptics.c |    2 ++
 1 file changed, 2 insertions(+)

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;
-- 
1.7.10

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to