mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-09 14:30:17 +01:00
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:
parent
fef5004c46
commit
847ce34597
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue