master: change active monitor when moving windows around (#5001)

This commit is contained in:
thejch 2024-03-07 05:23:22 -08:00 committed by GitHub
parent 77161fdbef
commit bf71026b8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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