mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-29 23:06:00 +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
|
// 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; }));
|
||||||
|
|
Loading…
Reference in a new issue