set lastmonitor in onDisconnect

This commit is contained in:
vaxerski 2022-10-29 22:45:01 +01:00
parent d994ad75e8
commit 2e32e202e9

View file

@ -151,6 +151,9 @@ void CMonitor::onDisconnect() {
} }
} }
if (g_pCompositor->m_pLastMonitor == this)
g_pCompositor->m_pLastMonitor = BACKUPMON;
// remove mirror // remove mirror
if (pMirrorOf) { if (pMirrorOf) {
pMirrorOf->mirrors.erase(std::find_if(pMirrorOf->mirrors.begin(), pMirrorOf->mirrors.end(), [&](const auto& other) { return other == this; })); pMirrorOf->mirrors.erase(std::find_if(pMirrorOf->mirrors.begin(), pMirrorOf->mirrors.end(), [&](const auto& other) { return other == this; }));