summaryrefslogtreecommitdiff
path: root/src/layout/algorithm/tiled/master
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-03-02 21:39:06 +0000
committerGitHub <noreply@github.com>2026-03-02 21:39:06 +0000
commitbe03497b82be332a124dd170e8741623791ef7c4 (patch)
tree06758f08e32a6647d43f70184be40fa1a1024074 /src/layout/algorithm/tiled/master
parentff20cbf89c68a87b12c0cd3453ac13d7c7197da5 (diff)
layout/algos: use binds:window_direction_monitor_fallback for moves (#13508)
ref https://github.com/hyprwm/Hyprland/discussions/13473
Diffstat (limited to 'src/layout/algorithm/tiled/master')
-rw-r--r--src/layout/algorithm/tiled/master/MasterAlgorithm.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/layout/algorithm/tiled/master/MasterAlgorithm.cpp b/src/layout/algorithm/tiled/master/MasterAlgorithm.cpp
index 88540d20..f2914a46 100644
--- a/src/layout/algorithm/tiled/master/MasterAlgorithm.cpp
+++ b/src/layout/algorithm/tiled/master/MasterAlgorithm.cpp
@@ -403,7 +403,9 @@ void CMasterAlgorithm::swapTargets(SP<ITarget> a, SP<ITarget> b) {
}
void CMasterAlgorithm::moveTargetInDirection(SP<ITarget> t, Math::eDirection dir, bool silent) {
- const auto PWINDOW2 = g_pCompositor->getWindowInDirection(t->window(), dir);
+ static auto PMONITORFALLBACK = CConfigValue<Hyprlang::INT>("binds:window_direction_monitor_fallback");
+
+ const auto PWINDOW2 = g_pCompositor->getWindowInDirection(t->window(), dir);
if (!t->window())
return;
@@ -424,6 +426,9 @@ void CMasterAlgorithm::moveTargetInDirection(SP<ITarget> t, Math::eDirection dir
t->window()->setAnimationsToMove();
if (t->window()->m_workspace != targetWs) {
+ if (!*PMONITORFALLBACK)
+ return; // noop
+
t->assignToSpace(targetWs->m_space, focalPointForDir(t, dir));
} else if (PWINDOW2) {
// if same monitor, switch windows