diff options
author | vaxerski <[email protected]> | 2023-09-18 11:33:19 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-09-18 11:33:19 +0100 |
commit | e4d6695375ee8bc4250543ec8e2f372d6b52f2a9 (patch) | |
tree | 19b6b4d56e35ab163dc3c2fd7bf97d4c04262bc7 | |
parent | b0a82c04dfc3f08183d68318a1d0eb4001c99559 (diff) | |
download | Hyprland-e4d6695375ee8bc4250543ec8e2f372d6b52f2a9.tar.gz Hyprland-e4d6695375ee8bc4250543ec8e2f372d6b52f2a9.zip |
keybinds: focus last window on workspace change to another mon
-rw-r--r-- | src/managers/KeybindManager.cpp | 5 |
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) |