mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 23:09:51 +01:00
move monitor remove notice up
This commit is contained in:
parent
428063ff23
commit
d8ee624e35
1 changed files with 4 additions and 4 deletions
|
@ -199,6 +199,10 @@ void CMonitor::onDisconnect() {
|
||||||
m_aLayerSurfaceLists[i].clear();
|
m_aLayerSurfaceLists[i].clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug::log(LOG, "Removed monitor %s!", szName.c_str());
|
||||||
|
|
||||||
|
g_pEventManager->postEvent(SHyprIPCEvent{"monitorremoved", szName});
|
||||||
|
|
||||||
if (!BACKUPMON) {
|
if (!BACKUPMON) {
|
||||||
Debug::log(WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend.");
|
Debug::log(WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend.");
|
||||||
|
|
||||||
|
@ -239,10 +243,6 @@ void CMonitor::onDisconnect() {
|
||||||
|
|
||||||
std::erase_if(g_pCompositor->m_vWorkspaces, [&](std::unique_ptr<CWorkspace>& el) { return el->m_iMonitorID == ID; });
|
std::erase_if(g_pCompositor->m_vWorkspaces, [&](std::unique_ptr<CWorkspace>& el) { return el->m_iMonitorID == ID; });
|
||||||
|
|
||||||
Debug::log(LOG, "Removed monitor %s!", szName.c_str());
|
|
||||||
|
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"monitorremoved", szName});
|
|
||||||
|
|
||||||
if (g_pCompositor->m_pLastMonitor == this)
|
if (g_pCompositor->m_pLastMonitor == this)
|
||||||
g_pCompositor->setActiveMonitor(BACKUPMON);
|
g_pCompositor->setActiveMonitor(BACKUPMON);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue