From efbe677beeb2bc38d86817c84604514f5cec6a80 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sat, 7 Jun 2025 22:17:40 +0800 Subject: [PATCH] fix: overview toggle miss judge current monitor --- src/layout/layout.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/layout/layout.h b/src/layout/layout.h index c8490af..c10988b 100644 --- a/src/layout/layout.h +++ b/src/layout/layout.h @@ -134,7 +134,7 @@ void grid(Monitor *m) { // 第一次遍历,计算 n 的值 wl_list_for_each(c, &clients, link) { - if (VISIBLEON(c, c->mon) && !c->isunglobal && + if (VISIBLEON(c, m) && !c->isunglobal && (m->isoverview || ISTILED(c))) { n++; } @@ -150,7 +150,7 @@ void grid(Monitor *m) { m->visible_clients == 1 && no_border_when_single && smartgaps ? 0 : borderpx; - if (VISIBLEON(c, c->mon) && !c->isunglobal && + if (VISIBLEON(c, m) && !c->isunglobal && (m->isoverview || ISTILED(c))) { cw = (m->w.width - 2 * overviewgappo) * 0.7; ch = (m->w.height - 2 * overviewgappo) * 0.8; @@ -173,7 +173,7 @@ void grid(Monitor *m) { m->visible_clients == 1 && no_border_when_single && smartgaps ? 0 : borderpx; - if (VISIBLEON(c, c->mon) && !c->isunglobal && + if (VISIBLEON(c, m) && !c->isunglobal && (m->isoverview || ISTILED(c))) { if (i == 0) { c->geom.x = m->w.x + overviewgappo; @@ -219,7 +219,7 @@ void grid(Monitor *m) { c->bw = m->visible_clients == 1 && no_border_when_single && smartgaps ? 0 : borderpx; - if (VISIBLEON(c, c->mon) && !c->isunglobal && + if (VISIBLEON(c, m) && !c->isunglobal && (m->isoverview || ISTILED(c))) { cx = m->w.x + (i % cols) * (cw + overviewgappi); cy = m->w.y + (i / cols) * (ch + overviewgappi); @@ -317,7 +317,7 @@ void scroller(Monitor *m) { // 第一次遍历,计算 n 的值 wl_list_for_each(c, &clients, link) { - if (VISIBLEON(c, c->mon) && ISTILED(c)) { + if (VISIBLEON(c, m) && ISTILED(c)) { n++; } } @@ -336,7 +336,7 @@ void scroller(Monitor *m) { // 第二次遍历,填充 tempClients n = 0; wl_list_for_each(c, &clients, link) { - if (VISIBLEON(c, c->mon) && ISTILED(c)) { + if (VISIBLEON(c, m) && ISTILED(c)) { tempClients[n] = c; n++; }