From ca1c1438e32fbf84408c187449d5fd17c9f5fdc2 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Thu, 9 Mar 2023 14:19:41 +0000 Subject: Compositor: fix crash on exit --- src/Compositor.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 04202a02..0c3e480f 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -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. } -- cgit v1.2.3