summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 698758f3..9c9ae1da 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -859,8 +859,11 @@ void CKeybindManager::changeworkspace(std::string args) {
PMONITORWORKSPACEOWNER->changeWorkspace(pWorkspaceToChangeTo, false, true);
- if (PMONITOR != PMONITORWORKSPACEOWNER)
+ if (PMONITOR != PMONITORWORKSPACEOWNER) {
g_pCompositor->warpCursorTo(PMONITORWORKSPACEOWNER->middle());
+ if (const auto PLAST = pWorkspaceToChangeTo->getLastFocusedWindow(); PLAST)
+ g_pCompositor->focusWindow(PLAST);
+ }
if (BISWORKSPACECURRENT) {
if (*PALLOWWORKSPACECYCLES)