mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-04 04:06:21 -05:00
opt: support center scroller stack in centerwin dispatch
This commit is contained in:
parent
eff11a5912
commit
43257ad49c
1 changed files with 5 additions and 2 deletions
|
|
@ -769,10 +769,13 @@ int32_t centerwin(const Arg *arg) {
|
|||
if (!is_scroller_layout(selmon))
|
||||
return 0;
|
||||
|
||||
Client *stack_head = get_scroll_stack_head(c);
|
||||
if (selmon->pertag->ltidxs[selmon->pertag->curtag]->id == SCROLLER) {
|
||||
c->geom.x = selmon->w.x + (selmon->w.width - c->geom.width) / 2;
|
||||
stack_head->geom.x =
|
||||
selmon->w.x + (selmon->w.width - stack_head->geom.width) / 2;
|
||||
} else {
|
||||
c->geom.y = selmon->w.y + (selmon->w.height - c->geom.height) / 2;
|
||||
stack_head->geom.y =
|
||||
selmon->w.y + (selmon->w.height - stack_head->geom.height) / 2;
|
||||
}
|
||||
|
||||
arrange(selmon, false, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue