fix:correct scroller mon to schedule mon

This commit is contained in:
DreamMaoMao 2025-03-30 17:27:12 +08:00
parent 94c93b912f
commit 32453bf9d5

View file

@ -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;