From be03497b82be332a124dd170e8741623791ef7c4 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Mon, 2 Mar 2026 21:39:06 +0000 Subject: layout/algos: use binds:window_direction_monitor_fallback for moves (#13508) ref https://github.com/hyprwm/Hyprland/discussions/13473 --- src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/layout/algorithm/tiled/scrolling') diff --git a/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp b/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp index 3b5dca4a..0c3bb1cc 100644 --- a/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp +++ b/src/layout/algorithm/tiled/scrolling/ScrollingAlgorithm.cpp @@ -848,7 +848,9 @@ void CScrollingAlgorithm::moveTargetInDirection(SP t, Math::eDirection } void CScrollingAlgorithm::moveTargetTo(SP t, Math::eDirection dir, bool silent) { - const auto DATA = dataFor(t); + static auto PMONITORFALLBACK = CConfigValue("binds:window_direction_monitor_fallback"); + + const auto DATA = dataFor(t); if (!DATA) return; @@ -953,6 +955,10 @@ void CScrollingAlgorithm::moveTargetTo(SP t, Math::eDirection dir, bool if (!commenceDir()) { // dir wasn't commenced, move to a workspace if possible // with the original dir + + if (!*PMONITORFALLBACK) + return; // noop + const auto MONINDIR = g_pCompositor->getMonitorInDirection(m_parent->space()->workspace()->m_monitor.lock(), dir); if (MONINDIR && MONINDIR != m_parent->space()->workspace()->m_monitor && MONINDIR->m_activeWorkspace) { t->assignToSpace(MONINDIR->m_activeWorkspace->m_space, focalPointForDir(t, dir)); -- cgit v1.2.3