diff options
author | Luke Smith <luke@lukesmith.xyz> | 2020-04-14 20:49:10 -0400 |
---|---|---|
committer | Luke Smith <luke@lukesmith.xyz> | 2020-04-14 20:49:10 -0400 |
commit | 73463070d76c4c4cf37cdd77898c6ec5407985dd (patch) | |
tree | 08a1908a197f044b81724524d7052c0ebc3c4129 /dwm.c | |
parent | 3e587d111d3728daa731dd51b86c2b1e2ba34ba2 (diff) | |
parent | 707881dd36aa6856c8eaaa81f90c0338289b9c91 (diff) |
Merge branch 'master' of https://github.com/kronikpillow/dwm into kronikpillow-master
Diffstat (limited to 'dwm.c')
-rw-r--r-- | dwm.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1226,16 +1226,16 @@ maprequest(XEvent *e) void monocle(Monitor *m) { - unsigned int n = 0; - Client *c; - - for (c = m->clients; c; c = c->next) - if (ISVISIBLE(c)) - n++; - if (n > 0) /* override layout symbol */ - snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); - for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) - resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0); + unsigned int n; + int oh, ov, ih, iv; + Client *c; + + getgaps(m, &oh, &ov, &ih, &iv, &n); + + if (n > 0) /* override layout symbol */ + snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); + for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) + resize(c, m->wx + ov, m->wy + oh, m->ww - 2 * c->bw - 2 * ov, m->wh - 2 * c->bw - 2 * oh, 0); } void |