mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-08 10:06:49 -05:00
fix: sync scroller_proportion in stack
This commit is contained in:
parent
39d2793e49
commit
59ca7c0fc1
4 changed files with 12 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue