From 07e097727f7bba8afc1abe29b1660a253ac64dad Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Tue, 21 Sep 2010 11:14:00 +0200 Subject: Add tap state to the tapping model Add the ability to read off the tap state in the tapping model. Useful for emulation i lieu of tapping gestures. Signed-off-by: Henrik Rydberg --- src/gestures-tapping.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gestures-tapping.c') diff --git a/src/gestures-tapping.c b/src/gestures-tapping.c index cb30168..aa8e6d6 100644 --- a/src/gestures-tapping.c +++ b/src/gestures-tapping.c @@ -46,6 +46,7 @@ int gru_tapping(struct grail *ge, struct tapping_model *state = &gru->tapping; struct move_model *move = &gru->move; grail_time_t up = move->time - state->end; + state->tap = 0; if (move->ntouch && move->ntouch < state->mintouch) state->end = move->time; if (move->ntouch > state->maxtouch) { @@ -80,6 +81,7 @@ int gru_tapping(struct grail *ge, state->active = 0; return 0; } + state->tap = state->maxtouch; state->prop[GRAIL_PROP_TAP_DT] = t; gin_gid_event(ge, state->gid, x, y, state->maxtouch, state->prop, state->nprop, 1); -- cgit v1.2.3