aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTom Englund <[email protected]>2024-04-08 16:32:31 +0200
committerGitHub <[email protected]>2024-04-08 15:32:31 +0100
commitdb91d949f7d1feeaae70ac4e17d3498da70fb9c5 (patch)
tree3959fa79344561a8344ba64a9cc4accff626b4d6
parent785d9d9521fec575447c9530f0d6c6e8e54f3825 (diff)
downloadHyprland-db91d949f7d1feeaae70ac4e17d3498da70fb9c5.tar.gz
Hyprland-db91d949f7d1feeaae70ac4e17d3498da70fb9c5.zip
compositor: move wl_display_destroy_clients (#5498)
if enough clients are open when destructing the compositor destroying clients will emit a wl_surface_unmap that a WLListener catches and doing so it calls listener_unmapLayerSurface that tries to iterate over input manager that is already destroyed, move the destruction of clients above g_pInputManager.reset() and removeAllSignals() to ensure we dont segfault at exit.
-rw-r--r--src/Compositor.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 5c42b8ff..fee98f8e 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -419,12 +419,10 @@ void CCompositor::cleanup() {
g_pXWaylandManager->m_sWLRXWayland = nullptr;
}
+ wl_display_destroy_clients(g_pCompositor->m_sWLDisplay);
removeAllSignals();
g_pInputManager.reset();
-
- wl_display_destroy_clients(g_pCompositor->m_sWLDisplay);
-
g_pDecorationPositioner.reset();
g_pCursorManager.reset();
g_pPluginSystem.reset();