fix: root client shouldn't use invisble client and floating client

This commit is contained in:
DreamMaoMao 2025-09-20 20:16:47 +08:00
parent 980ada2658
commit 6d24ee3945
4 changed files with 8 additions and 8 deletions

View file

@ -344,11 +344,11 @@ void vertical_scroller(Monitor *m) {
if (m->sel && !client_is_unmanaged(m->sel) && !m->sel->isfloating &&
!m->sel->ismaxmizescreen && !m->sel->isfullscreen) {
root_client = m->sel;
} else if (m->prevsel && ISTILED(m->prevsel) &&
} else if (m->prevsel && ISTILED(m->prevsel) && VISIBLEON(m->prevsel, m) &&
!client_is_unmanaged(m->prevsel)) {
root_client = m->prevsel;
} else {
root_client = center_select(m);
root_client = center_tiled_select(m);
}
if (!root_client) {