diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2009-05-16 20:11:08 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2009-05-16 20:11:08 +0200 |
| commit | ca85f84aedb3b4cfd78dfe1874239421de8807d6 (patch) | |
| tree | 282b54229e03183afcc7ea80f4cacbb19c132c16 /src/gestures.c | |
| parent | ba20f03d7d2794b3d794e839ba1db45ba327bb62 (diff) | |
Add multi-finger button and scroll from experimental
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/gestures.c')
| -rw-r--r-- | src/gestures.c | 10 |
1 files changed, 10 insertions, 0 deletions
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) | |||
| 25 | gs->dy /= dn; | 25 | gs->dy /= dn; |
| 26 | if (nsf == 1) | 26 | if (nsf == 1) |
| 27 | SETBIT(gs->type, GS_MOVE); | 27 | SETBIT(gs->type, GS_MOVE); |
| 28 | if (nsf == 2) | ||
| 29 | SETBIT(gs->type, GS_VSCROLL); | ||
| 30 | if (nsf == 3) | ||
| 31 | SETBIT(gs->type, GS_HSCROLL); | ||
| 32 | } | ||
| 33 | if (mt->ns.button == (1U << MT_BUTTON_LEFT)) { | ||
| 34 | if (nsf == 2) | ||
| 35 | mt->ns.button = (1U << MT_BUTTON_RIGHT); | ||
| 36 | if (nsf == 3) | ||
| 37 | mt->ns.button = (1U << MT_BUTTON_MIDDLE); | ||
| 28 | } | 38 | } |
| 29 | for (i = 0; i < DIM_BUTTON; i++) { | 39 | for (i = 0; i < DIM_BUTTON; i++) { |
| 30 | if (GETBIT(mt->ns.button, i) != GETBIT(mt->os.button, i)) { | 40 | if (GETBIT(mt->ns.button, i) != GETBIT(mt->os.button, i)) { |
