opt: optimize center_tile layout slave client position

This commit is contained in:
DreamMaoMao 2025-09-27 12:12:13 +08:00
parent 67d103fea1
commit 31b676b639

View file

@ -528,7 +528,8 @@ void center_tile(Monitor *m) {
// 多个堆叠窗口:交替放在左右两侧
unsigned int r = (n - i + 1) / 2;
if (stack_index % 2) {
// 当n为奇数时翻转判断逻辑
if ((stack_index % 2) ^ (n % 2 != 0)) {
// 右侧堆叠窗口
h = (m->w.height - ety - gappov - gappiv * (r - 1)) / r;
int stack_x = m->w.x + mx + mw + gappih;