Compositor: fix crash on exit

This commit is contained in:
vaxerski
2023-03-09 14:19:41 +00:00
parent 878fe20409
commit ca1c1438e3
2 changed files with 8 additions and 2 deletions

View File

@@ -341,8 +341,12 @@ void CCompositor::cleanup() {
g_pXWaylandManager->m_sWLRXWayland = nullptr;
}
wl_display_destroy_clients(g_pCompositor->m_sWLDisplay);
wl_display_terminate(m_sWLDisplay);
m_sWLDisplay = nullptr;
g_pKeybindManager->spawn("sleep 5 && kill -9 " + std::to_string(m_iHyprlandPID)); // this is to prevent that random "freezing"
// the PID should not be reused.
}