diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-08-10 14:40:08 +0100 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-08-10 15:04:18 +0100 |
| commit | a9a0e2c02bdd6e9dfdff523705e7afcb47e82adb (patch) | |
| tree | 27776cdb622750ab0610322d9e17877d34e11eca /src/gestures-tapping.c | |
| parent | 1e8aa1edc281132efa485f41741193af8ee13c8e (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.c | 3 |
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; | |||
| 28 | static const int TAP_CANCEL = 2; | 28 | static const int TAP_CANCEL = 2; |
| 29 | 29 | ||
| 30 | static const int TAP_MIN_GAP_MS = 25; | 30 | static const int TAP_MIN_GAP_MS = 25; |
| 31 | static const int TAP_MAX_GAP_MS = 300; | ||
| 32 | 31 | ||
| 33 | static const int fm_mask = 0x03; | 32 | static 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) |
