applied Gottox' adjustborder removal patch (thanks!)
1e350be2
2 file(s) · +2 −20
| 1 | 1 | # dwm version |
|
| 2 | - | VERSION = 5.4.1 |
|
| 2 | + | VERSION = 5.5 |
|
| 3 | 3 | ||
| 4 | 4 | # Customize below to fit your system |
|
| 5 | 5 |
| 128 | 128 | } Rule; |
|
| 129 | 129 | ||
| 130 | 130 | /* function declarations */ |
|
| 131 | - | static void adjustborder(Client *c, unsigned int bw); |
|
| 132 | 131 | static void applyrules(Client *c); |
|
| 133 | 132 | static void arrange(void); |
|
| 134 | 133 | static void attach(Client *c); |
|
| 246 | 245 | ||
| 247 | 246 | /* function implementations */ |
|
| 248 | 247 | void |
|
| 249 | - | adjustborder(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 | - | ||
| 258 | - | void |
|
| 259 | 248 | applyrules(Client *c) { |
|
| 260 | 249 | unsigned int i; |
|
| 261 | 250 | Rule *r; |
|
| 939 | 928 | ||
| 940 | 929 | void |
|
| 941 | 930 | monocle(void) { |
|
| 942 | - | unsigned int n; |
|
| 943 | 931 | Client *c; |
|
| 944 | 932 | ||
| 945 | - | for(n = 0, c = nexttiled(clients); c && n < 2; c = nexttiled(c->next), n++); |
|
| 946 | 933 | for(c = nexttiled(clients); c; c = nexttiled(c->next)) { |
|
| 947 | - | adjustborder(c, n == 1 ? 0 : borderpx); |
|
| 948 | 934 | resize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw, resizehints); |
|
| 949 | 935 | } |
|
| 950 | 936 | } |
|
| 1349 | 1335 | if(!c) |
|
| 1350 | 1336 | return; |
|
| 1351 | 1337 | if(ISVISIBLE(c)) { /* show clients top down */ |
|
| 1352 | - | if(c->isfloating || ntiled > 1) /* avoid unnecessary border reverts */ |
|
| 1353 | - | adjustborder(c, borderpx); |
|
| 1354 | 1338 | XMoveWindow(dpy, c->win, c->x, c->y); |
|
| 1355 | 1339 | if(!lt[sellt]->arrange || c->isfloating) |
|
| 1356 | 1340 | resize(c, c->x, c->y, c->w, c->h, True); |
|
| 1414 | 1398 | /* master */ |
|
| 1415 | 1399 | c = nexttiled(clients); |
|
| 1416 | 1400 | mw = mfact * ww; |
|
| 1417 | - | adjustborder(c, n == 1 ? 0 : borderpx); |
|
| 1418 | 1401 | resize(c, wx, wy, (n == 1 ? ww : mw) - 2 * c->bw, wh - 2 * c->bw, resizehints); |
|
| 1419 | 1402 | ||
| 1420 | 1403 | if(--n == 0) |
|
| 1429 | 1412 | h = wh; |
|
| 1430 | 1413 | ||
| 1431 | 1414 | for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) { |
|
| 1432 | - | adjustborder(c, borderpx); |
|
| 1433 | 1415 | resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n) |
|
| 1434 | 1416 | ? wy + wh - y - 2 * c->bw : h - 2 * c->bw), resizehints); |
|
| 1435 | 1417 | if(h != wh) |
|
| 1713 | 1695 | die("usage: dwm [-v]\n"); |
|
| 1714 | 1696 | ||
| 1715 | 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 | 1700 | if(!(dpy = XOpenDisplay(0))) |
|
| 1719 | 1701 | die("dwm: cannot open display\n"); |
|