summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjonsykkel <jonrevold@gmail.com>2021-02-26 06:35:29 +0100
committerjonsykkel <jonrevold@gmail.com>2021-02-26 06:41:52 +0100
commit146d1be309ba7ac187cf23a785a2f23e63baf566 (patch)
tree9ab89744a303f4f25e1466388c7206f2d1224cfb
parentab16831e712ab5a840a8f8e35f4193d140a1477a (diff)
downloaddwm-146d1be309ba7ac187cf23a785a2f23e63baf566.tar.gz
rem sb patc
-rw-r--r--dwm.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/dwm.c b/dwm.c
index 63b413a..ae63332 100644
--- a/dwm.c
+++ b/dwm.c
@@ -800,7 +800,6 @@ expose(XEvent *e)
void
focus(Client *c)
{
- XWindowChanges wc;
if (!c || !ISVISIBLE(c))
for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
if (selmon->sel && selmon->sel != c)
@@ -814,11 +813,6 @@ focus(Client *c)
attachstack(c);
grabbuttons(c, 1);
XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel);
- if (!c->isfloating) {
- wc.sibling = selmon->barwin;
- wc.stack_mode = Below;
- XConfigureWindow(dpy, c->win, CWSibling | CWStackMode, &wc);
- }
setfocus(c);
} else {
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
@@ -1135,7 +1129,7 @@ monocle(Monitor *m)
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 - c->bw, m->wy, m->ww, m->wh, False);
+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
}
void
@@ -1771,23 +1765,14 @@ tile(Monitor *m)
for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
if (i < m->nmaster) {
h = (m->wh - my) / (MIN(n, m->nmaster) - i);
-// resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0);
-// if (my + HEIGHT(c) < m->wh)
-// my += HEIGHT(c);
- if (n == 1)
- resize(c, m->wx - c->bw, m->wy, m->ww, m->wh, False);
- else
- resize(c, m->wx - c->bw, m->wy + my, mw - c->bw, h - c->bw, False);
+ resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0);
if (my + HEIGHT(c) < m->wh)
- my += HEIGHT(c) - c->bw;
+ my += HEIGHT(c);
} else {
h = (m->wh - ty) / (n - i);
-// resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0);
-// if (ty + HEIGHT(c) < m->wh)
-// ty += HEIGHT(c);
- resize(c, m->wx + mw - c->bw, m->wy + ty, m->ww - mw, h - c->bw, False);
+ resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0);
if (ty + HEIGHT(c) < m->wh)
- ty += HEIGHT(c) - c->bw;
+ ty += HEIGHT(c);
}
}