From a66b248ea998b466ff8246529127be4655320ed7 Mon Sep 17 00:00:00 2001 From: Jon H <> Date: Thu, 19 Mar 2026 11:45:11 -0700 Subject: [PATCH] Loop past master in bounded --- src/dispatch/bind_define.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index 6c9059dc..e051da0c 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -145,10 +145,10 @@ int32_t exchange_stack_client_bounded(const Arg *arg) { /* again, lazy we just search once more if we found master */ if (arg->i == NEXT) { tc = get_next_stack_client(c, false); - if (tc && tc->ismaster) tc = get_next_stack_client(tc, false); + while (tc && tc != c && tc->ismaster) tc = get_next_stack_client(tc, false); } else { tc = get_next_stack_client(c, true); - if (tc && tc->ismaster) tc = get_next_stack_client(tc, true); + while (tc && tc != c && tc->ismaster) tc = get_next_stack_client(tc, true); } if (tc) exchange_two_client(c, tc); @@ -295,10 +295,10 @@ int32_t focusstack_bounded(const Arg *arg) { /* lazy fix we just search twice, don't make new deeper functions */ if (arg->i == NEXT) { tc = get_next_stack_client(sel, false); - if (tc && tc->ismaster) tc = get_next_stack_client(tc, false); + while (tc && tc != sel && tc->ismaster) tc = get_next_stack_client(tc, false); } else { tc = get_next_stack_client(sel, true); - if (tc && tc->ismaster) tc = get_next_stack_client(tc, true); + while (tc && tc != sel && tc->ismaster) tc = get_next_stack_client(tc, true); } /* If only one client is visible on selmon, then c == sel */