aboutsummaryrefslogtreecommitdiffstats
path: root/driver/multitouch.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-06-16 18:48:53 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-06-16 18:54:52 +0200
commit21a363a2486a713434e890fc1f6b86a180755230 (patch)
treeca788ccf7c8269c5cbd41350463fa478aa499903 /driver/multitouch.c
parent523d193b089111849873d9de0ec1bf29f4176fbc (diff)
downloadxorg-input-kobomultitouch-21a363a2486a713434e890fc1f6b86a180755230.tar.gz
xorg-input-kobomultitouch-21a363a2486a713434e890fc1f6b86a180755230.tar.bz2
xorg-input-kobomultitouch-21a363a2486a713434e890fc1f6b86a180755230.zip
Add tapping logic
This patch adds tap-to-click, tap-and-hold for dragging, two-finger and three-finger taps. Turned on by default for touch screens only; switch on in gestures.c. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'driver/multitouch.c')
-rw-r--r--driver/multitouch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/driver/multitouch.c b/driver/multitouch.c
index 888c4c4..73a025d 100644
--- a/driver/multitouch.c
+++ b/driver/multitouch.c
@@ -245,6 +245,10 @@ static void handle_gestures(LocalDevicePtr local,
int step = 1 + rot_fraction * get_cap_xsize(caps);
button_scroll(local, 14, 15, &rot, step, gs->rot);
}
+ if (GETBIT(gs->type, GS_TAP) && gs->ntap == 1) {
+ foreach_bit(i, gs->tapmask)
+ tickle_button(local, i + 1);
+ }
}
/* called for each full received packet from the touchpad */
@@ -258,6 +262,10 @@ static void read_input(LocalDevicePtr local)
extract_gestures(&gs, mt);
handle_gestures(local, &gs, &mt->caps);
}
+ if (mt_is_idle(mt, local->fd)) {
+ extract_delayed_gestures(&gs, mt);
+ handle_gestures(local, &gs, &mt->caps);
+ }
}
}