summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorRyan Dwyer <RyanDwyer@users.noreply.github.com>2023-02-26 23:44:11 +1000
committerGitHub <noreply@github.com>2023-02-26 13:44:11 +0000
commit3bfaeacf7da1771243771139178e22d9893e7232 (patch)
treefa71114be9380565d677756aed6e2418162afff9 /src/managers/KeybindManager.cpp
parente3027248470dab4553273368de85d0f4cf357f78 (diff)
movefocus: Set new workspace as active when focusing new monitor (#1640)
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 81276eef..63cabd07 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -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);
}
}
};