From 51ad81de73dd0756f21aec7decf70966b6b288ac Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Tue, 12 May 2026 22:58:37 +0800 Subject: [PATCH] opt: keep the header order when the scroll header is pop out stack --- src/mango.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mango.c b/src/mango.c index 26ab81f0..a7159a39 100644 --- a/src/mango.c +++ b/src/mango.c @@ -4319,16 +4319,13 @@ mapnotify(struct wl_listener *listener, void *data) { if (selmon->sel && ISSCROLLTILED(selmon->sel) && VISIBLEON(selmon->sel, selmon)) { - at_client = scroll_get_stack_head_client(selmon->sel); + at_client = scroll_get_stack_tail_client(selmon->sel); } else { at_client = center_tiled_select(selmon); } if (at_client) { - at_client->link.next->prev = &c->link; - c->link.prev = &at_client->link; - c->link.next = at_client->link.next; - at_client->link.next = &c->link; + wl_list_insert(&at_client->link, &c->link); } else { wl_list_insert(clients.prev, &c->link); // 尾部入栈 }