From 8b621e667dda08a127e3028a2e03d5ed619b9499 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Fri, 18 Jun 2010 01:57:33 +0200 Subject: Use a non-blocking example instead of blocking The non-blocking example is more interesting in the X applications. Signed-off-by: Henrik Rydberg --- src/test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test.c b/src/test.c index 3a23db3..1b67986 100644 --- a/src/test.c +++ b/src/test.c @@ -35,8 +35,8 @@ static void loop_device(int fd) fprintf(stderr, "error: could not open device\n"); return; } - while (mtdev_pull(&mt.dev, fd, 1) > 0) { - if (parse_event(&mt)) { + while (!mtdev_idle(&mt.dev, fd, 5000)) { + while (read_packet(&mt, fd) > 0) { extract_gestures(&gs, &mt); output_gesture(&gs); } -- cgit v1.2.3