Skip to content

Commit

Permalink
compositor: move wl_display_destroy_clients (#5498)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gulafaran committed Apr 8, 2024
1 parent 785d9d9 commit db91d94
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Compositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit db91d94

Please sign in to comment.