aboutsummaryrefslogtreecommitdiffstats
path: root/src/gestures.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gestures.c')
-rw-r--r--src/gestures.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gestures.c b/src/gestures.c
index fb81576..d075356 100644
--- a/src/gestures.c
+++ b/src/gestures.c
@@ -90,10 +90,18 @@ static void extract_type(struct Gestures *gs, struct MTouch* mt)
if (gs->dx || gs->dy) {
if (mt->state.nfinger == 1)
SETBIT(gs->type, GS_MOVE);
- if (mt->state.nfinger == 2)
- SETBIT(gs->type, GS_VSCROLL);
- if (mt->state.nfinger == 3)
- SETBIT(gs->type, GS_HSCROLL);
+ if (mt->state.nfinger == 2) {
+ if (gs->dx)
+ SETBIT(gs->type, GS_HSCROLL);
+ if (gs->dy)
+ SETBIT(gs->type, GS_VSCROLL);
+ }
+ if (mt->state.nfinger == 3) {
+ if (gs->dx)
+ SETBIT(gs->type, GS_HSWIPE);
+ if (gs->dy)
+ SETBIT(gs->type, GS_VSWIPE);
+ }
}
}