keybinds: focus last window on workspace change to another mon

This commit is contained in:
vaxerski 2023-09-18 11:33:19 +01:00
parent b0a82c04df
commit e4d6695375
1 changed files with 4 additions and 1 deletions

View File

@ -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)