diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index c7e09186..4cff8bed 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -977,6 +977,8 @@ void CHyprMasterLayout::moveWindowTo(CWindow* pWindow, const std::string& dir) { onWindowRemovedTiling(pWindow); pWindow->moveToWorkspace(PWINDOW2->m_iWorkspaceID); pWindow->m_iMonitorID = PWINDOW2->m_iMonitorID; + const auto pMonitor = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID); + g_pCompositor->setActiveMonitor(pMonitor); onWindowCreatedTiling(pWindow); } else { // if same monitor, switch windows