improve monocle layout animation
@@ -153,8 +153,16 @@ monocle(Monitor *m)
n++;
if (n > 0) /* override layout symbol */
snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%1u]", n);
- for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
- animateclient(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, ccount < 5 ? 10 : 0, 0);
+ for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
+ if (animated && c == selmon->sel)
+ continue;
+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
+ }
+
+ if (animated && selmon->sel) {
+ c = selmon->sel;
+ animateclient(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 7, 0);
+ }
}
void
