mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-10 09:01:55 -07:00
keybinds: focus last window on workspace change to another mon
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user