From 1a164704e7596d743dfeade3946385997254b019 Mon Sep 17 00:00:00 2001 From: erstarr <253168930+erstarr@users.noreply.github.com> Date: Fri, 8 May 2026 20:34:54 +0200 Subject: keybind/actions: `cycle_next` w/ `tiled = true` doesn't choose only tiled windows (#14164) * fix tiling only selection: actually select only tiling when chosen * clang-format * test: cycle_next float only and tiled only --- src/config/shared/actions/ConfigActions.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/config/shared/actions/ConfigActions.cpp b/src/config/shared/actions/ConfigActions.cpp index 52b2a359..5fc16308 100644 --- a/src/config/shared/actions/ConfigActions.cpp +++ b/src/config/shared/actions/ConfigActions.cpp @@ -1665,11 +1665,15 @@ ActionResult Actions::cycleNext(const bool next, std::optional onlyTiled, } } - std::optional floatStatus = {}; - if (onlyFloating.value_or(false)) - floatStatus = true; + // true = floating + // false = tiling + // either-or = either-or + std::optional tileOrFloatOnly = std::nullopt; - const auto& cycled = g_pCompositor->getWindowCycle(window, true, floatStatus, false, !next, window->m_workspace && window->m_workspace->m_hasFullscreenWindow); + if (onlyTiled.value_or(false) != onlyFloating.value_or(false)) + tileOrFloatOnly = onlyFloating.value_or(false); + + const auto& cycled = g_pCompositor->getWindowCycle(window, true, tileOrFloatOnly, false, !next, window->m_workspace && window->m_workspace->m_hasFullscreenWindow); switchToWindow(cycled); -- cgit v1.2.3