mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-07-05 00:06:20 -04:00
opt: Ensure that the client remains in the linked list until it is destroyed
This commit is contained in:
parent
634ca7a51c
commit
22ecd84225
6 changed files with 54 additions and 41 deletions
|
|
@ -2071,13 +2071,11 @@ int32_t scroller_apply_stack(Client *c, Client *target_client,
|
|||
|
||||
if (direction == LEFT || direction == UP) {
|
||||
if (c != stack_head) {
|
||||
wl_list_remove(&c->link);
|
||||
wl_list_insert(stack_head->link.prev, &c->link);
|
||||
wl_list_safe_reinsert_prev(&stack_head->link, &c->link);
|
||||
}
|
||||
} else if (direction == RIGHT || direction == DOWN) {
|
||||
if (c != stack_tail) {
|
||||
wl_list_remove(&c->link);
|
||||
wl_list_insert(&stack_tail->link, &c->link);
|
||||
wl_list_safe_reinsert_next(&stack_head->link, &c->link);
|
||||
}
|
||||
}
|
||||
sync_scroller_state_to_clients(m, tag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue