diff --git a/src/fetch/client.h b/src/fetch/client.h index c2b0abd..a9cfed0 100644 --- a/src/fetch/client.h +++ b/src/fetch/client.h @@ -128,8 +128,9 @@ Client *center_tiled_select(Monitor *m) { int dirx, diry; long int distance; wl_list_for_each(c, &clients, link) { - if (c && VISIBLEON(c, m) && ISTILED(c) && client_surface(c)->mapped && - !c->isfloating && !client_is_unmanaged(c)) { + if (c && VISIBLEON(c, m) && ISSCROLLTILED(c) && + client_surface(c)->mapped && !c->isfloating && + !client_is_unmanaged(c)) { dirx = c->geom.x + c->geom.width / 2 - (m->w.x + m->w.width / 2); diry = c->geom.y + c->geom.height / 2 - (m->w.y + m->w.height / 2); distance = dirx * dirx + diry * diry; diff --git a/src/layout/horizontal.h b/src/layout/horizontal.h index 2385c84..3471fdf 100644 --- a/src/layout/horizontal.h +++ b/src/layout/horizontal.h @@ -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)) { diff --git a/src/layout/vertical.h b/src/layout/vertical.h index 7eb9529..f6aa6b8 100644 --- a/src/layout/vertical.h +++ b/src/layout/vertical.h @@ -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)) {