mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
Merge branch 'jorth/prepare-read' into 'main'
client: reject prepare_read if the display queue has events See merge request wayland/wayland!470
This commit is contained in:
commit
0552b9ca83
1 changed files with 4 additions and 1 deletions
|
|
@ -1969,10 +1969,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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue