From 21a363a2486a713434e890fc1f6b86a180755230 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Wed, 16 Jun 2010 18:48:53 +0200 Subject: 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 --- src/mtouch.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mtouch.c') 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; +} -- cgit v1.2.3