mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 17:49:50 +01:00
set lastmonitor in onDisconnect
This commit is contained in:
parent
d994ad75e8
commit
2e32e202e9
1 changed files with 3 additions and 0 deletions
|
@ -151,6 +151,9 @@ void CMonitor::onDisconnect() {
|
|||
}
|
||||
}
|
||||
|
||||
if (g_pCompositor->m_pLastMonitor == this)
|
||||
g_pCompositor->m_pLastMonitor = BACKUPMON;
|
||||
|
||||
// remove mirror
|
||||
if (pMirrorOf) {
|
||||
pMirrorOf->mirrors.erase(std::find_if(pMirrorOf->mirrors.begin(), pMirrorOf->mirrors.end(), [&](const auto& other) { return other == this; }));
|
||||
|
|
Loading…
Reference in a new issue