aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/events')
-rw-r--r--src/events/Monitors.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp
index 13de69a5..aade1f6e 100644
--- a/src/events/Monitors.cpp
+++ b/src/events/Monitors.cpp
@@ -106,6 +106,10 @@ void Events::listener_monitorFrame(void* owner, void* data) {
if ((g_pCompositor->m_sWLRSession && !g_pCompositor->m_sWLRSession->active) || !g_pCompositor->m_bSessionActive || g_pCompositor->m_bUnsafeState) {
Debug::log(WARN, "Attempted to render frame on inactive session!");
+
+ if (g_pCompositor->m_bUnsafeState)
+ g_pConfigManager->performMonitorReload();
+
return; // cannot draw on session inactive (different tty)
}
@@ -351,6 +355,9 @@ void Events::listener_monitorDestroy(void* owner, void* data) {
pMonitor->onDisconnect();
+ pMonitor->output = nullptr;
+ pMonitor->m_bRenderingInitPassed = false;
+
// cleanup if not unsafe
if (!g_pCompositor->m_bUnsafeState) {
Debug::log(LOG, "Removing monitor %s from realMonitors", pMonitor->output->name);