fix: sync scroller_proportion in stack

This commit is contained in:
DreamMaoMao 2026-01-17 18:26:44 +08:00
parent 39d2793e49
commit 59ca7c0fc1
4 changed files with 12 additions and 3 deletions

View file

@ -1634,6 +1634,9 @@ int32_t scroller_stack(const Arg *arg) {
stack_tail = stack_tail->next_in_stack;
}
Client *stack_head = get_scroll_stack_head(target_client);
c->scroller_proportion = stack_head->scroller_proportion;
// Add c to the stack
stack_tail->next_in_stack = c;
c->prev_in_stack = stack_tail;

View file

@ -489,9 +489,13 @@ void resize_tile_scroller(Client *grabc, bool isdrag, int32_t offsetx,
grabc->scroller_proportion = new_scroller_proportion;
grabc->stack_proportion = new_stack_proportion;
if (grabc->prev_in_stack) {
grabc->prev_in_stack->scroller_proportion =
grabc->scroller_proportion;
Client *stack_head = get_scroll_stack_head(grabc);
Client *iter = stack_head;
while(iter) {
iter->scroller_proportion = grabc->scroller_proportion;
iter = iter->next_in_stack;
}
if (!isdrag) {

View file

@ -218,6 +218,7 @@ void arrange_stack(Client *scroller_stack_head, struct wlr_box geometry,
Client *iter = scroller_stack_head;
while (iter) {
stack_size++;
iter->scroller_proportion = scroller_stack_head->scroller_proportion;
iter = iter->next_in_stack;
}

View file

@ -205,6 +205,7 @@ void arrange_stack_vertical(Client *scroller_stack_head,
Client *iter = scroller_stack_head;
while (iter) {
stack_size++;
iter->scroller_proportion = scroller_stack_head->scroller_proportion;
iter = iter->next_in_stack;
}