summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandcompositor.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-03-12 13:46:21 +0100
committerJohan Helsing <johan.helsing@qt.io>2019-03-14 12:13:21 +0000
commit489fedaa320a4941a9fc6a17df1a791c93270bb8 (patch)
tree5344ff7bf1146864fe0fa2ba22166e3e954649f9 /src/compositor/compositor_api/qwaylandcompositor.cpp
parent7206b4e8b6e10f5623b19ca132f538066c96aab5 (diff)
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 <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'src/compositor/compositor_api/qwaylandcompositor.cpp')
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
index 173b50ce..a0d69c52 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);
}