mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-08 21:25:59 +01:00
more monitor checks for shutdown:
This commit is contained in:
parent
ee3b770cfd
commit
0508c7d384
2 changed files with 5 additions and 3 deletions
|
@ -250,6 +250,8 @@ void CCompositor::cleanup() {
|
|||
m_vWorkspaces.clear();
|
||||
m_vWindows.clear();
|
||||
|
||||
m_bIsShuttingDown = true;
|
||||
|
||||
for (auto& m : m_vMonitors) {
|
||||
g_pHyprOpenGL->destroyMonitorResources(m.get());
|
||||
|
||||
|
@ -257,6 +259,8 @@ void CCompositor::cleanup() {
|
|||
wlr_output_commit(m->output);
|
||||
}
|
||||
|
||||
m_vMonitors.clear();
|
||||
|
||||
if (g_pXWaylandManager->m_sWLRXWayland) {
|
||||
wlr_xwayland_destroy(g_pXWaylandManager->m_sWLRXWayland);
|
||||
g_pXWaylandManager->m_sWLRXWayland = nullptr;
|
||||
|
@ -264,8 +268,6 @@ void CCompositor::cleanup() {
|
|||
|
||||
wl_display_terminate(m_sWLDisplay);
|
||||
|
||||
m_bIsShuttingDown = true;
|
||||
|
||||
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.
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ void CMonitor::onConnect(bool noRule) {
|
|||
|
||||
void CMonitor::onDisconnect() {
|
||||
|
||||
if (!m_bEnabled)
|
||||
if (!m_bEnabled || g_pCompositor->m_bIsShuttingDown)
|
||||
return;
|
||||
|
||||
// Cleanup everything. Move windows back, snap cursor, shit.
|
||||
|
|
Loading…
Reference in a new issue