From 5560623f4012d08400dc5fdb6697fc5f439200d9 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Tue, 10 Jun 2025 18:44:36 +0800 Subject: [PATCH] opt: ignore focus client not tile in ov layout --- src/layout/layout.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layout/layout.h b/src/layout/layout.h index c10988b..a4dd932 100644 --- a/src/layout/layout.h +++ b/src/layout/layout.h @@ -135,7 +135,7 @@ void grid(Monitor *m) { // 第一次遍历,计算 n 的值 wl_list_for_each(c, &clients, link) { if (VISIBLEON(c, m) && !c->isunglobal && - (m->isoverview || ISTILED(c))) { + ((m->isoverview && !client_should_ignore_focus(c)) || ISTILED(c))) { n++; } } @@ -151,7 +151,7 @@ void grid(Monitor *m) { ? 0 : borderpx; if (VISIBLEON(c, m) && !c->isunglobal && - (m->isoverview || ISTILED(c))) { + ((m->isoverview && !client_should_ignore_focus(c)) || ISTILED(c))) { cw = (m->w.width - 2 * overviewgappo) * 0.7; ch = (m->w.height - 2 * overviewgappo) * 0.8; c->geom.x = m->w.x + (m->w.width - cw) / 2; @@ -174,7 +174,7 @@ void grid(Monitor *m) { ? 0 : borderpx; if (VISIBLEON(c, m) && !c->isunglobal && - (m->isoverview || ISTILED(c))) { + ((m->isoverview && !client_should_ignore_focus(c)) || ISTILED(c))) { if (i == 0) { c->geom.x = m->w.x + overviewgappo; c->geom.y = m->w.y + (m->w.height - ch) / 2 + overviewgappo; @@ -220,7 +220,7 @@ void grid(Monitor *m) { ? 0 : borderpx; if (VISIBLEON(c, m) && !c->isunglobal && - (m->isoverview || ISTILED(c))) { + ((m->isoverview && !client_should_ignore_focus(c)) || ISTILED(c))) { cx = m->w.x + (i % cols) * (cw + overviewgappi); cy = m->w.y + (i / cols) * (ch + overviewgappi); if (overcols && i >= n - overcols) {