Don't return error when dispatching didn't queue any event

As reading from timers or evdev does not necessarily mean an input
event is queued and ready to be retrieved with libinput_get_event(),
don't report such behaviour as an error.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
Jonas Ådahl 2013-12-30 22:08:35 +01:00
parent fef5004c46
commit 847ce34597
2 changed files with 3 additions and 3 deletions

View file

@ -560,7 +560,7 @@ libinput_dispatch(struct libinput *libinput)
free(source);
list_init(&libinput->source_destroy_list);
return libinput->events_count > 0 ? 0 : -EAGAIN;
return 0;
}
static void

View file

@ -466,11 +466,11 @@ libinput_get_fd(struct libinput *libinput);
* and processes them internally. Use libinput_get_event() to retrieve the
* events.
*
* Dispatching does not necessarily queue libinput events.
*
* @param libinput A previously initialized libinput context
*
* @return 0 on success, or a negative errno on failure
* @retval -EAGAIN libinput_dispatch completed successfully but no events
* are ready to read with libinput_get_event()
*/
int
libinput_dispatch(struct libinput *libinput);