From 369a38d68350ab2eadabdfdd8627af9e377eff1b Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Tue, 20 Jan 2026 14:25:07 +0800 Subject: [PATCH] fix: fix exchange client error when not in scroller layout --- src/mango.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mango.c b/src/mango.c index e81883d..f7aabd7 100644 --- a/src/mango.c +++ b/src/mango.c @@ -4384,7 +4384,8 @@ void exchange_two_client(Client *c1, Client *c2) { tmp2_prev_in_stack->next_in_stack = c1; if (tmp1_next_in_stack) tmp1_next_in_stack->prev_in_stack = c2; - } else if (c1->prev_in_stack || c2->prev_in_stack) { + } else if (is_scroller_layout(c1->mon) && + (c1->prev_in_stack || c2->prev_in_stack)) { Client *c1head = get_scroll_stack_head(c1); Client *c2head = get_scroll_stack_head(c2); exchange_two_client(c1head, c2head);