summaryrefslogtreecommitdiff
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
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>
-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,
215 int vswipestep = 1 + vswipe_fraction * get_cap_ysize(caps); 215 int vswipestep = 1 + vswipe_fraction * get_cap_ysize(caps);
216 int hswipestep = 1 + hswipe_fraction * get_cap_xsize(caps); 216 int hswipestep = 1 + hswipe_fraction * get_cap_xsize(caps);
217 int i; 217 int i;
218 if (!gs->same_fingers) {
219 vscroll = 0;
220 hscroll = 0;
221 vswipe = 0;
222 hswipe = 0;
223 }
218 for (i = 0; i < DIM_BUTTON; i++) { 224 for (i = 0; i < DIM_BUTTON; i++) {
219 if (GETBIT(gs->btmask, i)) { 225 if (GETBIT(gs->btmask, i)) {
220 xf86PostButtonEvent(local->dev, FALSE, 226 xf86PostButtonEvent(local->dev, FALSE,