summaryrefslogtreecommitdiff
path: root/src/gestures.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-04-14 16:07:17 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-04-15 06:10:08 +0200
commit2e51d27cf6e1380e7bf4744215bf16243af2829d (patch)
treeb4baa44ba1107fb694a4813cdc337fcc078ace13 /src/gestures.c
parente5bff8354652f5798d1906004150790377abc775 (diff)
Define swipe gestures
Define three-finger vertical and horizontal scroll as vertical and horizontal swipe gestures. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
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)
90 if (gs->dx || gs->dy) { 90 if (gs->dx || gs->dy) {
91 if (mt->state.nfinger == 1) 91 if (mt->state.nfinger == 1)
92 SETBIT(gs->type, GS_MOVE); 92 SETBIT(gs->type, GS_MOVE);
93 if (mt->state.nfinger == 2) 93 if (mt->state.nfinger == 2) {
94 SETBIT(gs->type, GS_VSCROLL); 94 if (gs->dx)
95 if (mt->state.nfinger == 3) 95 SETBIT(gs->type, GS_HSCROLL);
96 SETBIT(gs->type, GS_HSCROLL); 96 if (gs->dy)
97 SETBIT(gs->type, GS_VSCROLL);
98 }
99 if (mt->state.nfinger == 3) {
100 if (gs->dx)
101 SETBIT(gs->type, GS_HSWIPE);
102 if (gs->dy)
103 SETBIT(gs->type, GS_VSWIPE);
104 }
97 } 105 }
98} 106}
99 107