From 43257ad49cd76dc42ab4237dc9650d9f96a7fd26 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Mon, 19 Jan 2026 14:21:28 +0800 Subject: [PATCH] opt: support center scroller stack in centerwin dispatch --- src/dispatch/bind_define.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index 0268078..2d40c22 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -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);