diff --git a/src/wayland-client.c b/src/wayland-client.c index 50b3b4b2..10483206 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -1975,10 +1975,13 @@ wl_display_prepare_read_queue(struct wl_display *display, struct wl_event_queue *queue) { int ret; + bool has_events; pthread_mutex_lock(&display->mutex); - if (!wl_list_empty(&queue->event_list)) { + has_events = !wl_list_empty(&queue->event_list) || + !wl_list_empty(&display->display_queue.event_list); + if (has_events || display->last_error) { errno = EAGAIN; ret = -1; } else {