diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-10-18 16:13:55 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-10-18 16:33:21 +0200 |
| commit | 878a64f830fbf4135e7450df50655616da9a8dc6 (patch) | |
| tree | b86e73707aa3af8a854ef893db63dc0bfd6054fd | |
| parent | 0c1c58d22ee7a47add33b100d54cc3acc4aa1093 (diff) | |
Report touch down on one-finger entry
The current code mistakenly set the pointer logic based on
the single variable, which is false at the entry to one-finger
mode, but true immediately afterwards. This leads to grail
sometimes failing to emit the proper emulation sequence, resulting
in a missed touch in X.
This patch corrects the logic such that the pointer is based directly
on one-finger mode, thereby solving the problem.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| -rw-r--r-- | src/grail-api.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/grail-api.c b/src/grail-api.c index bf5a7df..9cc94df 100644 --- a/src/grail-api.c +++ b/src/grail-api.c | |||
| @@ -90,10 +90,10 @@ static void handle_abs_events(struct grail *ge, const struct input_event *syn) | |||
| 90 | struct tapping_model *tap = &gru->tapping; | 90 | struct tapping_model *tap = &gru->tapping; |
| 91 | int used_move = grail_mask_count(gin->types, sizeof(gin->types)); | 91 | int used_move = grail_mask_count(gin->types, sizeof(gin->types)); |
| 92 | int used_tap = grail_mask_get(gin->types, GRAIL_TYPE_TAP1); | 92 | int used_tap = grail_mask_get(gin->types, GRAIL_TYPE_TAP1); |
| 93 | int ismove = move->single && (move->active & fm_mask) && !used_move; | 93 | int pointer = move->ntouch == 1; |
| 94 | int ishold = move->single && tap->active && !used_move; | 94 | int ismove = pointer && (move->active & fm_mask) && !used_move; |
| 95 | int ishold = pointer && tap->active && !used_move; | ||
| 95 | int istap = gru->tapping.tap == 1 && !used_tap; | 96 | int istap = gru->tapping.tap == 1 && !used_tap; |
| 96 | int pointer = move->single; | ||
| 97 | 97 | ||
| 98 | if (!impl->pointer_status && pointer) { | 98 | if (!impl->pointer_status && pointer) { |
| 99 | impl->report_x = impl->pointer_x; | 99 | impl->report_x = impl->pointer_x; |
