summaryrefslogtreecommitdiff
path: root/src/gestures-tapping.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-08-10 14:40:08 +0100
committerHenrik Rydberg <rydberg@euromail.se>2010-08-10 15:04:18 +0100
commita9a0e2c02bdd6e9dfdff523705e7afcb47e82adb (patch)
tree27776cdb622750ab0610322d9e17877d34e11eca /src/gestures-tapping.c
parent1e8aa1edc281132efa485f41741193af8ee13c8e (diff)
Filter abs events by default in grail-gesture
Also connect the timeout for press with the timeout of tapping. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/gestures-tapping.c')
-rw-r--r--src/gestures-tapping.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gestures-tapping.c b/src/gestures-tapping.c
index d8a580f..0deacf8 100644
--- a/src/gestures-tapping.c
+++ b/src/gestures-tapping.c
@@ -28,7 +28,6 @@ static const int TAP_END = 1;
28static const int TAP_CANCEL = 2; 28static const int TAP_CANCEL = 2;
29 29
30static const int TAP_MIN_GAP_MS = 25; 30static const int TAP_MIN_GAP_MS = 25;
31static const int TAP_MAX_GAP_MS = 300;
32 31
33static const int fm_mask = 0x03; 32static const int fm_mask = 0x03;
34 33
@@ -66,7 +65,7 @@ int gru_tapping(struct grail *ge,
66 } 65 }
67 if (state->ntouch < 1 || state->ntouch > 5) 66 if (state->ntouch < 1 || state->ntouch > 5)
68 state->status = TAP_CANCEL; 67 state->status = TAP_CANCEL;
69 if (move->time - state->start > TAP_MAX_GAP_MS) 68 if (move->time - state->start > move->fm[FM_X].bar_ms)
70 state->status = TAP_CANCEL; 69 state->status = TAP_CANCEL;
71 if (state->status == TAP_END && 70 if (state->status == TAP_END &&
72 move->time - state->start < TAP_MIN_GAP_MS) 71 move->time - state->start < TAP_MIN_GAP_MS)