From b139789fbbfafe8fa739dab03b1aa9ee659a7d50 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 30 Mar 2025 21:24:56 +0800 Subject: [PATCH] fix: can't autoscroll when foucs change --- maomao.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/maomao.c b/maomao.c index 7a2080c..253e1ef 100644 --- a/maomao.c +++ b/maomao.c @@ -3095,8 +3095,8 @@ void focusclient(Client *c, int lift) { if (selmon) { selmon->prevsel = selmon->sel; selmon->sel = c; - if (c && selmon->prevsel && selmon->prevsel->istiled && - selmon->prevsel->tags == c->tags && c->istiled && !c->isfloating && + if (c && selmon->prevsel && !selmon->prevsel->isfloating && + selmon->prevsel->tags == c->tags && !c->isfloating && !c->isfullscreen && strcmp(selmon->pertag->ltidxs[selmon->pertag->curtag]->name, "scroller") == 0) { @@ -5704,11 +5704,11 @@ void scroller(Monitor *m, unsigned int gappo, unsigned int gappi) { return; } - if (m->sel && m->sel->istiled && !c->ismaxmizescreen && - !c->isfullscreen) { + if (m->sel && !m->sel->isfloating && !m->sel->ismaxmizescreen && + !m->sel->isfullscreen) { root_client = m->sel; - } else if (m->prevsel && m->prevsel->istiled && - !c->ismaxmizescreen && !c->isfullscreen) { + } else if (m->prevsel && !m->prevsel->isfloating && + !m->prevsel->ismaxmizescreen && !m->prevsel->isfullscreen) { root_client = m->prevsel; } else { wl_list_for_each(c, &clients, link) {