mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-23 05:35:51 -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
ffa88810c7
1 changed files with 4 additions and 1 deletions
|
|
@ -1975,10 +1975,13 @@ wl_display_prepare_read_queue(struct wl_display *display,
|
||||||
struct wl_event_queue *queue)
|
struct wl_event_queue *queue)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
bool has_events;
|
||||||
|
|
||||||
pthread_mutex_lock(&display->mutex);
|
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;
|
errno = EAGAIN;
|
||||||
ret = -1;
|
ret = -1;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue