summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config.mk2
-rw-r--r--dwm.c20
2 files changed, 2 insertions, 20 deletions
diff --git a/config.mk b/config.mk
index e70799a..40e74b0 100644
--- a/config.mk
+++ b/config.mk
@@ -1,5 +1,5 @@
1# dwm version 1# dwm version
2VERSION = 5.4.1 2VERSION = 5.5
3 3
4# Customize below to fit your system 4# Customize below to fit your system
5 5
diff --git a/dwm.c b/dwm.c
index ef723cc..5f42cbe 100644
--- a/dwm.c
+++ b/dwm.c
@@ -128,7 +128,6 @@ typedef struct {
128} Rule; 128} Rule;
129 129
130/* function declarations */ 130/* function declarations */
131static void adjustborder(Client *c, unsigned int bw);
132static void applyrules(Client *c); 131static void applyrules(Client *c);
133static void arrange(void); 132static void arrange(void);
134static void attach(Client *c); 133static void attach(Client *c);
@@ -246,16 +245,6 @@ struct NumTags { char limitexceeded[sizeof(unsigned int) * 8 < LENGTH(tags) ? -1
246 245
247/* function implementations */ 246/* function implementations */
248void 247void
249adjustborder(Client *c, unsigned int bw) {
250 XWindowChanges wc;
251
252 if(c->bw != bw) {
253 c->bw = wc.border_width = bw;
254 XConfigureWindow(dpy, c->win, CWBorderWidth, &wc);
255 }
256}
257
258void
259applyrules(Client *c) { 248applyrules(Client *c) {
260 unsigned int i; 249 unsigned int i;
261 Rule *r; 250 Rule *r;
@@ -939,12 +928,9 @@ maprequest(XEvent *e) {
939 928
940void 929void
941monocle(void) { 930monocle(void) {
942 unsigned int n;
943 Client *c; 931 Client *c;
944 932
945 for(n = 0, c = nexttiled(clients); c && n < 2; c = nexttiled(c->next), n++);
946 for(c = nexttiled(clients); c; c = nexttiled(c->next)) { 933 for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
947 adjustborder(c, n == 1 ? 0 : borderpx);
948 resize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw, resizehints); 934 resize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw, resizehints);
949 } 935 }
950} 936}
@@ -1349,8 +1335,6 @@ showhide(Client *c, unsigned int ntiled) {
1349 if(!c) 1335 if(!c)
1350 return; 1336 return;
1351 if(ISVISIBLE(c)) { /* show clients top down */ 1337 if(ISVISIBLE(c)) { /* show clients top down */
1352 if(c->isfloating || ntiled > 1) /* avoid unnecessary border reverts */
1353 adjustborder(c, borderpx);
1354 XMoveWindow(dpy, c->win, c->x, c->y); 1338 XMoveWindow(dpy, c->win, c->x, c->y);
1355 if(!lt[sellt]->arrange || c->isfloating) 1339 if(!lt[sellt]->arrange || c->isfloating)
1356 resize(c, c->x, c->y, c->w, c->h, True); 1340 resize(c, c->x, c->y, c->w, c->h, True);
@@ -1414,7 +1398,6 @@ tile(void) {
1414 /* master */ 1398 /* master */
1415 c = nexttiled(clients); 1399 c = nexttiled(clients);
1416 mw = mfact * ww; 1400 mw = mfact * ww;
1417 adjustborder(c, n == 1 ? 0 : borderpx);
1418 resize(c, wx, wy, (n == 1 ? ww : mw) - 2 * c->bw, wh - 2 * c->bw, resizehints); 1401 resize(c, wx, wy, (n == 1 ? ww : mw) - 2 * c->bw, wh - 2 * c->bw, resizehints);
1419 1402
1420 if(--n == 0) 1403 if(--n == 0)
@@ -1429,7 +1412,6 @@ tile(void) {
1429 h = wh; 1412 h = wh;
1430 1413
1431 for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { 1414 for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
1432 adjustborder(c, borderpx);
1433 resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n) 1415 resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
1434 ? wy + wh - y - 2 * c->bw : h - 2 * c->bw), resizehints); 1416 ? wy + wh - y - 2 * c->bw : h - 2 * c->bw), resizehints);
1435 if(h != wh) 1417 if(h != wh)
@@ -1713,7 +1695,7 @@ main(int argc, char *argv[]) {
1713 die("usage: dwm [-v]\n"); 1695 die("usage: dwm [-v]\n");
1714 1696
1715 if(!setlocale(LC_CTYPE, "") || !XSupportsLocale()) 1697 if(!setlocale(LC_CTYPE, "") || !XSupportsLocale())
1716 fprintf(stderr, "warning: no locale support\n"); 1698 fputs("warning: no locale support\n", stderr);
1717 1699
1718 if(!(dpy = XOpenDisplay(0))) 1700 if(!(dpy = XOpenDisplay(0)))
1719 die("dwm: cannot open display\n"); 1701 die("dwm: cannot open display\n");