From ca85f84aedb3b4cfd78dfe1874239421de8807d6 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Sat, 16 May 2009 20:11:08 +0200 Subject: Add multi-finger button and scroll from experimental Signed-off-by: Henrik Rydberg --- src/gestures.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gestures.c') diff --git a/src/gestures.c b/src/gestures.c index 8dfb939..9a1281c 100644 --- a/src/gestures.c +++ b/src/gestures.c @@ -25,6 +25,16 @@ void extract_gestures(struct Gestures *gs, struct MTouch* mt) gs->dy /= dn; if (nsf == 1) SETBIT(gs->type, GS_MOVE); + if (nsf == 2) + SETBIT(gs->type, GS_VSCROLL); + if (nsf == 3) + SETBIT(gs->type, GS_HSCROLL); + } + if (mt->ns.button == (1U << MT_BUTTON_LEFT)) { + if (nsf == 2) + mt->ns.button = (1U << MT_BUTTON_RIGHT); + if (nsf == 3) + mt->ns.button = (1U << MT_BUTTON_MIDDLE); } for (i = 0; i < DIM_BUTTON; i++) { if (GETBIT(mt->ns.button, i) != GETBIT(mt->os.button, i)) { -- cgit v1.2.3