opt: keep the header order when the scroll header is pop out stack

This commit is contained in:
DreamMaoMao 2026-05-12 22:58:37 +08:00
parent 3b4c4aeca0
commit 51ad81de73

View file

@ -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); // 尾部入栈
}