aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/multitouch.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/multitouch.c b/src/multitouch.c
index 6a54c45..f6e5305 100644
--- a/src/multitouch.c
+++ b/src/multitouch.c
@@ -257,14 +257,13 @@ static void handle_gestures(LocalDevicePtr local,
}
if (GETBIT(gs->type, GS_HSCROLL)) {
hscroll += gs->dx;
- // sweep is more natural as a one-time thing
- if (hscroll > hstep) {
+ while (hscroll > hstep) {
tickle_button(local, 6);
- hscroll = 0;
- }
- if (hscroll < -hstep) {
+ hscroll -= hstep;
+ }
+ while (hscroll < -hstep) {
tickle_button(local, 7);
- hscroll = 0;
+ hscroll += hstep;
}
TRACE1("hscroll: %d\n", gs->dx);
}