From 489fedaa320a4941a9fc6a17df1a791c93270bb8 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Tue, 12 Mar 2019 13:46:21 +0100 Subject: Compositor: Call eglUnbindWaylandDisplayWL when destroying the compositor If unbind is not called, some drivers may try to do cleanup that depends on a valid wl_display in eglTerminate. Arguably, this could/should also have been fixed in the affected drivers. There is a display_destroy signal that the driver should listen to, to avoid using dangling wl_display and wl_global pointers. However, by using eglUnbindWaylandDisplayWL we can force the cleanup to happen before wl_display_destroy. Which is what this patch does. Change-Id: Id9062de896b723838bcecac3902031e6b172a6de Reviewed-by: Paul Olav Tvete Reviewed-by: Pier Luigi Fiorini --- src/compositor/compositor_api/qwaylandcompositor.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/compositor/compositor_api/qwaylandcompositor.cpp') diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp index 173b50ce0..a0d69c52e 100644 --- a/src/compositor/compositor_api/qwaylandcompositor.cpp +++ b/src/compositor/compositor_api/qwaylandcompositor.cpp @@ -243,6 +243,9 @@ QWaylandCompositorPrivate::~QWaylandCompositorPrivate() delete data_device_manager; #endif + // Some client buffer integrations need to clean up before the destroying the wl_display + client_buffer_integration.reset(); + wl_display_destroy(display); } -- cgit v1.2.3