From d8e8d112aa907f8021ae99e6d7cd7856f1d90b70 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Thu, 5 Aug 2010 12:40:49 +0200 Subject: Add four-finger and five-finger gestures Add four-finger and five-finger gestures, and move all gesture types out to a separate file. Signed-off-by: Henrik Rydberg --- src/gestures-combo.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/gestures-combo.c') diff --git a/src/gestures-combo.c b/src/gestures-combo.c index 8b4ad8c..7b8dbd5 100644 --- a/src/gestures-combo.c +++ b/src/gestures-combo.c @@ -26,6 +26,15 @@ #include #include +static const int getype[DIM_TOUCH + 1] = { + 0, + 0, + GRAIL_TYPE_COMBO2, + GRAIL_TYPE_COMBO3, + GRAIL_TYPE_COMBO4, + GRAIL_TYPE_COMBO5, +}; + int gru_combo(struct grail *ge, const struct touch_frame *frame) { @@ -44,8 +53,7 @@ int gru_combo(struct grail *ge, !move->r.tickle && !move->a.tickle) return 0; if (!state->active) { - int type = move->ntouch == 2 ? GRAIL_TYPE_COMBO2 : - move->ntouch == 3 ? GRAIL_TYPE_COMBO3 : 0; + int type = getype[move->ntouch]; if (!type) return 0; state->gid = gin_gid_begin(ge, type, PRIO_GESTURE, frame); -- cgit v1.2.3