summaryrefslogtreecommitdiff
path: root/src/gestures-tapping.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gestures-tapping.c')
-rw-r--r--src/gestures-tapping.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gestures-tapping.c b/src/gestures-tapping.c
index a5357e4..1a02731 100644
--- a/src/gestures-tapping.c
+++ b/src/gestures-tapping.c
@@ -30,6 +30,8 @@ static const int TAP_CANCEL = 2;
30static const int TAP_MIN_GAP_MS = 25; 30static const int TAP_MIN_GAP_MS = 25;
31static const int TAP_MAX_GAP_MS = 300; 31static const int TAP_MAX_GAP_MS = 300;
32 32
33static const int fm_mask = 0x03;
34
33int gru_tapping(struct grail *ge, 35int gru_tapping(struct grail *ge,
34 const struct touch_frame *frame) 36 const struct touch_frame *frame)
35{ 37{
@@ -69,7 +71,7 @@ int gru_tapping(struct grail *ge,
69 if (state->status == TAP_END && 71 if (state->status == TAP_END &&
70 move->time - state->start < TAP_MIN_GAP_MS) 72 move->time - state->start < TAP_MIN_GAP_MS)
71 state->status = TAP_CANCEL; 73 state->status = TAP_CANCEL;
72 if (move->x.active || move->y.active) 74 if (move->active & fm_mask)
73 state->status = TAP_CANCEL; 75 state->status = TAP_CANCEL;
74 if (state->status == TAP_CANCEL) { 76 if (state->status == TAP_CANCEL) {
75 if (state->active) { 77 if (state->active) {
@@ -84,7 +86,7 @@ int gru_tapping(struct grail *ge,
84 return 0; 86 return 0;
85 prop[0] = move->time - state->start; 87 prop[0] = move->time - state->start;
86 gin_gid_event(ge, state->gid, 88 gin_gid_event(ge, state->gid,
87 move->x.val, move->y.val, state->ntouch, 89 move->fm[FM_X].val, move->fm[FM_Y].val, state->ntouch,
88 prop, 1, GRAIL_STATUS_END); 90 prop, 1, GRAIL_STATUS_END);
89 state->status = TAP_BEGIN; 91 state->status = TAP_BEGIN;
90 state->ntouch = 0; 92 state->ntouch = 0;