mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 05:45:58 +01:00
keybinds: focus last window on workspace change to another mon
This commit is contained in:
parent
b0a82c04df
commit
e4d6695375
1 changed files with 4 additions and 1 deletions
|
@ -859,8 +859,11 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
|
|
||||||
PMONITORWORKSPACEOWNER->changeWorkspace(pWorkspaceToChangeTo, false, true);
|
PMONITORWORKSPACEOWNER->changeWorkspace(pWorkspaceToChangeTo, false, true);
|
||||||
|
|
||||||
if (PMONITOR != PMONITORWORKSPACEOWNER)
|
if (PMONITOR != PMONITORWORKSPACEOWNER) {
|
||||||
g_pCompositor->warpCursorTo(PMONITORWORKSPACEOWNER->middle());
|
g_pCompositor->warpCursorTo(PMONITORWORKSPACEOWNER->middle());
|
||||||
|
if (const auto PLAST = pWorkspaceToChangeTo->getLastFocusedWindow(); PLAST)
|
||||||
|
g_pCompositor->focusWindow(PLAST);
|
||||||
|
}
|
||||||
|
|
||||||
if (BISWORKSPACECURRENT) {
|
if (BISWORKSPACECURRENT) {
|
||||||
if (*PALLOWWORKSPACECYCLES)
|
if (*PALLOWWORKSPACECYCLES)
|
||||||
|
|
Loading…
Reference in a new issue