summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-04-15 21:37:24 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-04-15 21:41:15 +0200
commitc63075febe60edc81d39bab22a77684df129a67d (patch)
tree57ff9469cc558ffc3991d85ad2b3606ce6546a9b /src
parent748c2cb48e6bd1c47ad125556b97871a7252b492 (diff)
Reset scroll state on finger configuration change
When scrolling, the current code remembers how close the movement is to emitting a scroll button, in order to produce a continuous stepping motion. However, when the finger configuration on the trackpad changes, this state should start over again, or the next scolling gesture may scroll prematurely. This patch resets the scrolling state when a change is detected, which fixes the problem. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src')
-rw-r--r--src/multitouch.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/multitouch.c b/src/multitouch.c
index cc57cad..a11b8da 100644
--- a/src/multitouch.c
+++ b/src/multitouch.c
@@ -215,6 +215,12 @@ static void handle_gestures(LocalDevicePtr local,
int vswipestep = 1 + vswipe_fraction * get_cap_ysize(caps);
int hswipestep = 1 + hswipe_fraction * get_cap_xsize(caps);
int i;
+ if (!gs->same_fingers) {
+ vscroll = 0;
+ hscroll = 0;
+ vswipe = 0;
+ hswipe = 0;
+ }
for (i = 0; i < DIM_BUTTON; i++) {
if (GETBIT(gs->btmask, i)) {
xf86PostButtonEvent(local->dev, FALSE,