From 1124d477861f60d436d15f2d84ae5d0c7ced9091 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 83f31cc..3a2331d 100644 --- a/src/mango.c +++ b/src/mango.c @@ -4444,7 +4444,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);