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.
This commit is contained in:
Tom Englund 2024-04-08 16:32:31 +02:00 committed by GitHub
parent 785d9d9521
commit db91d949f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -419,12 +419,10 @@ void CCompositor::cleanup() {
g_pXWaylandManager->m_sWLRXWayland = nullptr; g_pXWaylandManager->m_sWLRXWayland = nullptr;
} }
wl_display_destroy_clients(g_pCompositor->m_sWLDisplay);
removeAllSignals(); removeAllSignals();
g_pInputManager.reset(); g_pInputManager.reset();
wl_display_destroy_clients(g_pCompositor->m_sWLDisplay);
g_pDecorationPositioner.reset(); g_pDecorationPositioner.reset();
g_pCursorManager.reset(); g_pCursorManager.reset();
g_pPluginSystem.reset(); g_pPluginSystem.reset();