1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
3 Date: Thu, 2 Mar 2023 09:35:08 +0200
4 Subject: [PATCH] egl/wayland: Fix destruction of event queue with proxies
7 Destroy the display wrapper proxy before destroying the event queue that
8 the proxy is attached to.
10 This silences a warning that libwayland 1.22 emits for programs that use
13 warning: queue 0x562a5ed2cd20 destroyed while proxies still attached:
14 wl_display@1 still attached
16 Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
17 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21646>
19 src/egl/drivers/dri2/platform_wayland.c | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
22 diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
23 index 32b0ff70002d..962bc34a2166 100644
24 --- a/src/egl/drivers/dri2/platform_wayland.c
25 +++ b/src/egl/drivers/dri2/platform_wayland.c
26 @@ -2800,10 +2800,10 @@ dri2_teardown_wayland(struct dri2_egl_display *dri2_dpy)
27 wl_shm_destroy(dri2_dpy->wl_shm);
28 if (dri2_dpy->wl_registry)
29 wl_registry_destroy(dri2_dpy->wl_registry);
30 - if (dri2_dpy->wl_queue)
31 - wl_event_queue_destroy(dri2_dpy->wl_queue);
32 if (dri2_dpy->wl_dpy_wrapper)
33 wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper);
34 + if (dri2_dpy->wl_queue)
35 + wl_event_queue_destroy(dri2_dpy->wl_queue);
37 if (dri2_dpy->own_device)
38 wl_display_disconnect(dri2_dpy->wl_dpy);