mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 21:13:48 -07:00
move monitor remove notice up
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user