diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2011-02-24 11:58:57 +0100 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2011-03-14 12:55:19 +0100 |
| commit | 58492d2cd0a38b0d26ea25bddead95bb0fe1c5ce (patch) | |
| tree | aacf22cd6e0d10919bb170ff299d061a713f274a /src/grail-api.c | |
| parent | 8d663cda3c338940ebbd8adc38f24e9b2f2d61c3 (diff) | |
Wait for the right number of fingers before gesture timeout
A client listening only for multi-finger gestures will not get
the chance to recognize unless there is a gesture timeout. This
patch waits until the drag hold time has passed before releasing
the touch.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/grail-api.c')
| -rw-r--r-- | src/grail-api.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/grail-api.c b/src/grail-api.c index 6521f84..255c6c2 100644 --- a/src/grail-api.c +++ b/src/grail-api.c | |||
| @@ -155,9 +155,11 @@ static void flush_gestures(struct grail *ge) | |||
| 155 | 155 | ||
| 156 | static int gesture_timeout(struct grail *ge, const struct utouch_frame *frame) | 156 | static int gesture_timeout(struct grail *ge, const struct utouch_frame *frame) |
| 157 | { | 157 | { |
| 158 | struct gesture_recognizer *gru = ge->gru; | ||
| 158 | struct gesture_inserter *gin = ge->gin; | 159 | struct gesture_inserter *gin = ge->gin; |
| 159 | 160 | ||
| 160 | return grail_mask_count(gin->used, sizeof(gin->used)) == 0; | 161 | return grail_mask_count(gin->used, sizeof(gin->used)) == 0 && |
| 162 | frame->time - frame->mod_time > gru->move.fm[FM_X].hold_ms; | ||
| 161 | } | 163 | } |
| 162 | 164 | ||
| 163 | static void report_frame(struct grail *ge, | 165 | static void report_frame(struct grail *ge, |
