keybinds: fix movewindoworgroup onto empy workspace on next monitor (#4486)

* fix: movewindoworgroup when no window or group is in desired direction, e.g. move window onto empty workspace on next monitor

* fix: movewindoworgroup when no window or group is in desired direction, e.g. move window onto empty workspace on next monitor

* reset flake.nix

* add: changes mentioned in review of #4486
This commit is contained in:
Bernd Müller 2024-02-26 15:05:24 +01:00 committed by GitHub
parent 81fe2ae7f1
commit 1742605eb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

2
.gitignore vendored
View file

@ -31,3 +31,5 @@ gmon.out
PKGBUILD
src/version.h
.direnv

View file

@ -2273,8 +2273,12 @@ void CKeybindManager::moveWindowOrGroup(std::string args) {
g_pCompositor->warpCursorTo(PWINDOW->middle());
} else
moveWindowOutOfGroup(PWINDOW, args);
} else if ((*PIGNOREGROUPLOCK || !ISWINDOWGROUPLOCKED) && ISWINDOWGROUP) // no target window
} else if ((*PIGNOREGROUPLOCK || !ISWINDOWGROUPLOCKED) && ISWINDOWGROUP) { // no target window
moveWindowOutOfGroup(PWINDOW, args);
} else if (!PWINDOWINDIR && !ISWINDOWGROUP) { // no target in dir and not in group
g_pLayoutManager->getCurrentLayout()->moveWindowTo(PWINDOW, args);
g_pCompositor->warpCursorTo(PWINDOW->middle());
}
g_pCompositor->updateWindowAnimatedDecorationValues(PWINDOW);
}