opt: optimize scroller layout center client judge

This commit is contained in:
DreamMaoMao
2025-11-30 11:57:34 +08:00
parent 992822e309
commit 1b7e998b67
3 changed files with 5 additions and 4 deletions

View File

@@ -284,7 +284,7 @@ void scroller(Monitor *m) {
return;
}
if (m->sel && !client_is_unmanaged(m->sel) && !m->sel->isfloating) {
if (m->sel && !client_is_unmanaged(m->sel) && ISSCROLLTILED(m->sel)) {
root_client = m->sel;
} else if (m->prevsel && ISSCROLLTILED(m->prevsel) &&
VISIBLEON(m->prevsel, m) && !client_is_unmanaged(m->prevsel)) {

View File

@@ -246,7 +246,7 @@ void vertical_scroller(Monitor *m) {
return;
}
if (m->sel && !client_is_unmanaged(m->sel) && !m->sel->isfloating) {
if (m->sel && !client_is_unmanaged(m->sel) && ISSCROLLTILED(m->sel)) {
root_client = m->sel;
} else if (m->prevsel && ISSCROLLTILED(m->prevsel) &&
VISIBLEON(m->prevsel, m) && !client_is_unmanaged(m->prevsel)) {