mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-29 10:40:42 +02:00
wsi/wl: Fix deadlock in dispatch_queue_timeout.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: a00f9c401b ("loader/wayland: Add fallback wl_display_dispatch_queue_timeout")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27828>
This commit is contained in:
parent
a2292f53b5
commit
2d3e7b6e9a
1 changed files with 6 additions and 0 deletions
|
|
@ -122,6 +122,12 @@ wl_display_dispatch_queue_timeout(struct wl_display *display,
|
|||
ret = wl_display_dispatch_queue_pending(display, queue);
|
||||
if (ret != 0)
|
||||
break;
|
||||
|
||||
/* wl_display_dispatch_queue_pending can return 0 if we ended up reading
|
||||
* from WL fd, but there was no complete event to dispatch yet.
|
||||
* Try reading again. */
|
||||
if (wl_display_prepare_read_queue(display, queue) == -1)
|
||||
return wl_display_dispatch_queue_pending(display, queue);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue