From 3a3a0c87a76ea57a84dd88b949e2c8837ba096de Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 5 Dec 2013 17:33:47 +1000 Subject: [PATCH] libinput_dispatch: return -EAGAIN if no events are ready Notify the caller that no events are currently ready to be processed. Signed-off-by: Peter Hutterer --- src/libinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libinput.c b/src/libinput.c index b54f57ce..7dc31793 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -227,7 +227,7 @@ libinput_dispatch(struct libinput *libinput) free(source); list_init(&libinput->source_destroy_list); - return 0; + return libinput->events_count > 0 ? 0 : -EAGAIN; } static void