opt: Ensure that the client remains in the linked list until it is destroyed

This commit is contained in:
DreamMaoMao 2026-06-29 09:58:13 +08:00
parent b73cd4ef90
commit 3b3170ef7d
6 changed files with 49 additions and 41 deletions

View file

@ -46,8 +46,8 @@ static void finish_exchange_arrange_and_focus(Client *c1, Client *c2,
} else {
arrange(c1->mon, false, false);
}
wl_list_remove(&c2->flink);
wl_list_insert(&c1->flink, &c2->flink);
wl_list_safe_reinsert_next(&c1->flink, &c2->flink);
if (config.warpcursor)
warp_cursor(c1);