movefocus: Set new workspace as active when focusing new monitor (#1640)

This commit is contained in:
Ryan Dwyer 2023-02-26 23:44:11 +10:00 committed by GitHub
parent e302724847
commit 3bfaeacf7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1132,8 +1132,12 @@ void CKeybindManager::moveFocusTo(std::string args) {
if (PLASTWINDOW->m_iMonitorID != PWINDOWTOCHANGETO->m_iMonitorID) {
// event
const auto PNEWMON = g_pCompositor->getMonitorFromID(PWINDOWTOCHANGETO->m_iMonitorID);
const auto PNEWWORKSPACE = g_pCompositor->getWorkspaceByID(PWINDOWTOCHANGETO->m_iWorkspaceID);
g_pCompositor->setActiveMonitor(PNEWMON);
g_pCompositor->deactivateAllWLRWorkspaces(PNEWWORKSPACE->m_pWlrHandle);
PNEWWORKSPACE->setActive(true);
}
}
};