aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBernd Müller <[email protected]>2024-02-26 15:05:24 +0100
committerGitHub <[email protected]>2024-02-26 14:05:24 +0000
commit1742605eb89b17d04d807dfb1a21ac0deb3a945c (patch)
tree523f545ab91bbf5a360ae10e5160882df399bba6
parent81fe2ae7f1da7578ac5208158c5bbc4d079effa3 (diff)
downloadHyprland-1742605eb89b17d04d807dfb1a21ac0deb3a945c.tar.gz
Hyprland-1742605eb89b17d04d807dfb1a21ac0deb3a945c.zip
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
-rw-r--r--.gitignore2
-rw-r--r--src/managers/KeybindManager.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index dfee530e..b8423e8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,5 @@ gmon.out
PKGBUILD
src/version.h
+
+.direnv
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 4bd652be..a74e880d 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -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);
}