diff --git a/src/wayland-client.c b/src/wayland-client.c index 9f817f69..1b7a0466 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -1152,8 +1152,13 @@ read_events(struct wl_display *display) if (display->reader_count == 0) { total = wl_connection_read(display->connection); if (total == -1) { - if (errno == EAGAIN) + if (errno == EAGAIN) { + /* we must wake up threads whenever + * the reader_count dropped to 0 */ + display_wakeup_threads(display); + return 0; + } display_fatal_error(display, errno); return -1;