From 878a64f830fbf4135e7450df50655616da9a8dc6 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Mon, 18 Oct 2010 16:13:55 +0200 Subject: 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 --- src/grail-api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/grail-api.c') 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) struct tapping_model *tap = &gru->tapping; int used_move = grail_mask_count(gin->types, sizeof(gin->types)); int used_tap = grail_mask_get(gin->types, GRAIL_TYPE_TAP1); - int ismove = move->single && (move->active & fm_mask) && !used_move; - int ishold = move->single && tap->active && !used_move; + int pointer = move->ntouch == 1; + int ismove = pointer && (move->active & fm_mask) && !used_move; + int ishold = pointer && tap->active && !used_move; int istap = gru->tapping.tap == 1 && !used_tap; - int pointer = move->single; if (!impl->pointer_status && pointer) { impl->report_x = impl->pointer_x; -- cgit v1.2.3