diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2010-04-14 16:07:17 +0200 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2010-04-15 06:10:08 +0200 |
commit | 2e51d27cf6e1380e7bf4744215bf16243af2829d (patch) | |
tree | b4baa44ba1107fb694a4813cdc337fcc078ace13 /src/gestures.c | |
parent | e5bff8354652f5798d1906004150790377abc775 (diff) | |
download | xorg-input-kobomultitouch-2e51d27cf6e1380e7bf4744215bf16243af2829d.tar.gz xorg-input-kobomultitouch-2e51d27cf6e1380e7bf4744215bf16243af2829d.tar.bz2 xorg-input-kobomultitouch-2e51d27cf6e1380e7bf4744215bf16243af2829d.zip |
Define swipe gestures
Define three-finger vertical and horizontal scroll as vertical and
horizontal swipe gestures.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/gestures.c')
-rw-r--r-- | src/gestures.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gestures.c b/src/gestures.c index fb81576..d075356 100644 --- a/src/gestures.c +++ b/src/gestures.c @@ -90,10 +90,18 @@ static void extract_type(struct Gestures *gs, struct MTouch* mt) if (gs->dx || gs->dy) { if (mt->state.nfinger == 1) SETBIT(gs->type, GS_MOVE); - if (mt->state.nfinger == 2) - SETBIT(gs->type, GS_VSCROLL); - if (mt->state.nfinger == 3) - SETBIT(gs->type, GS_HSCROLL); + if (mt->state.nfinger == 2) { + if (gs->dx) + SETBIT(gs->type, GS_HSCROLL); + if (gs->dy) + SETBIT(gs->type, GS_VSCROLL); + } + if (mt->state.nfinger == 3) { + if (gs->dx) + SETBIT(gs->type, GS_HSWIPE); + if (gs->dy) + SETBIT(gs->type, GS_VSWIPE); + } } } |