summaryrefslogtreecommitdiff
path: root/src/mtouch.c
diff options
context:
space:
mode:
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)
73#endif 73#endif
74 return 1; 74 return 1;
75} 75}
76
77int mt_is_idle(struct MTouch *mt, int fd)
78{
79 return mt->mem.wait &&
80 evbuf_empty(&mt->dev.outbuf) &&
81 evbuf_empty(&mt->dev.inbuf) &&
82 poll_iobuf(&mt->buf, fd, mt->mem.wait) == 0;
83}