aboutsummaryrefslogtreecommitdiffstats
path: root/src/mtouch.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 /src/mtouch.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 'src/mtouch.c')
-rw-r--r--src/mtouch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mtouch.c b/src/mtouch.c
index 7272edf..14c0fd9 100644
--- a/src/mtouch.c
+++ b/src/mtouch.c
@@ -73,3 +73,11 @@ int parse_event(struct MTouch *mt, const struct input_event *ev)
#endif
return 1;
}
+
+int mt_is_idle(struct MTouch *mt, int fd)
+{
+ return mt->mem.wait &&
+ evbuf_empty(&mt->dev.outbuf) &&
+ evbuf_empty(&mt->dev.inbuf) &&
+ poll_iobuf(&mt->buf, fd, mt->mem.wait) == 0;
+}