From 32453bf9d56754f05d5a82b8eab6d8ccdb564b60 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 30 Mar 2025 17:27:12 +0800 Subject: [PATCH] fix:correct scroller mon to schedule mon --- maomao.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/maomao.c b/maomao.c index b685eb7..847f309 100644 --- a/maomao.c +++ b/maomao.c @@ -5666,7 +5666,7 @@ void scroller(Monitor *m, unsigned int gappo, unsigned int gappi) { wl_list_for_each(c, &clients, link) { if (VISIBLEON(c, c->mon) && !c->isfloating && !c->isfullscreen && !c->ismaxmizescreen && !c->iskilling && !c->animation.tagouting && - c->mon == selmon) { + c->mon == m) { n++; } } @@ -5687,7 +5687,7 @@ void scroller(Monitor *m, unsigned int gappo, unsigned int gappi) { wl_list_for_each(c, &clients, link) { if (VISIBLEON(c, c->mon) && !c->isfloating && !c->isfullscreen && !c->ismaxmizescreen && !c->iskilling && !c->animation.tagouting && - c->mon == selmon) { + c->mon == m) { tempClients[n] = c; n++; } @@ -5704,12 +5704,12 @@ void scroller(Monitor *m, unsigned int gappo, unsigned int gappi) { return; } - if (selmon->sel && selmon->sel->istiled && !c->ismaxmizescreen && + if (m->sel && m->sel->istiled && !c->ismaxmizescreen && !c->isfullscreen) { - root_client = selmon->sel; - } else if (selmon->prevsel && selmon->prevsel->istiled && + root_client = m->sel; + } else if (m->prevsel && m->prevsel->istiled && !c->ismaxmizescreen && !c->isfullscreen) { - root_client = selmon->prevsel; + root_client = m->prevsel; } else { wl_list_for_each(c, &clients, link) { if (c->iskilling) @@ -5739,8 +5739,8 @@ void scroller(Monitor *m, unsigned int gappo, unsigned int gappi) { target_geom.y = m->w.y + (m->w.height - target_geom.height) / 2; if (need_scroller) { - if (scoller_focus_center || selmon->prevsel == NULL || - (selmon->prevsel->scroller_proportion * max_client_width) + + if (scoller_focus_center || m->prevsel == NULL || + (m->prevsel->scroller_proportion * max_client_width) + (root_client->scroller_proportion * max_client_width) > m->w.width - 2 * scroller_structs - gappih) { target_geom.x = m->w.x + (m->w.width - target_geom.width) / 2;