From 46d66f4bcc95d9fb7fede18ad5c2c043796b9071 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 24 Sep 2023 18:04:38 +0100 Subject: internal: Further unsafe state improvements (#3404) Instead of allowing Hyprland to sit in a state where there are no monitors, which various parts of the code don't like, we create a fake headless output on all monitor disconnect, and then remove it when a monitor appears --- src/helpers/Monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/helpers/Monitor.cpp') diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 97a8fe20..dd9580d1 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -243,7 +243,7 @@ void CMonitor::onDisconnect() { if (!BACKUPMON) { Debug::log(WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend."); - g_pCompositor->m_bUnsafeState = true; + g_pCompositor->enterUnsafeState(); } if (BACKUPMON) { -- cgit v1.2.3