summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorrafa_99 <rafa99@protonmail.com>2021-06-09 20:09:52 +0100
committerrafa_99 <rafa99@protonmail.com>2021-06-09 20:09:52 +0100
commitd87049c698e09afd33dcb89bcfaa7bab62016d6d (patch)
tree85a93dc2172f6cca81d2ed5c6e2aadd5260a5465 /dwm.c
parent9bec820eb41c258bc839c165640c2575f4e6bc3e (diff)
Revert "Singular Borders Patch"
This reverts commit 9bec820eb41c258bc839c165640c2575f4e6bc3e.
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/dwm.c b/dwm.c
index 0db3d97..17e1c1a 100644
--- a/dwm.c
+++ b/dwm.c
@@ -849,8 +849,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)
@@ -864,11 +862,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);
@@ -1189,7 +1182,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
@@ -1836,15 +1829,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);
- 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);
- my += HEIGHT(c) - c->bw;
+ 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);
} else {
h = (m->wh - ty) / (n - i);
- resize(c, m->wx + mw - c->bw, m->wy + ty, m->ww - mw, h - c->bw, False);
- ty += HEIGHT(c) - c->bw;
+ 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);
}
}
@@ -2605,12 +2597,12 @@ fibonacci(Monitor *mon, int s) {
for(n = 0, c = nexttiled(mon->clients); c; c = nexttiled(c->next), n++);
if(n == 0)
return;
-
+
nx = mon->wx;
ny = 0;
nw = mon->ww;
nh = mon->wh;
-
+
for(i = 0, c = nexttiled(mon->clients); c; c = nexttiled(c->next)) {
if((i % 2 && nh / 2 > 2 * c->bw)
|| (!(i % 2) && nw / 2 > 2 * c->bw)) {