mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-02 09:01:43 -05:00
fix: overview toggle miss judge current monitor
This commit is contained in:
parent
c7060b546d
commit
efbe677bee
1 changed files with 6 additions and 6 deletions
|
|
@ -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++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue