aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-03-09 14:19:41 +0000
committervaxerski <[email protected]>2023-03-09 14:19:54 +0000
commitca1c1438e32fbf84408c187449d5fd17c9f5fdc2 (patch)
tree8281c27abad251c2b9ad144e7b048f363593b6db /src/Compositor.cpp
parent878fe204096d08a4dc4fa359c19120720517cf2f (diff)
downloadHyprland-ca1c1438e32fbf84408c187449d5fd17c9f5fdc2.tar.gz
Hyprland-ca1c1438e32fbf84408c187449d5fd17c9f5fdc2.zip
Compositor: fix crash on exit
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp4
1 files changed, 4 insertions, 0 deletions
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.
}