Introduction
Introduction Statistics Contact Development Disclaimer Help
dwm-noborder-6.1.diff - sites - public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log
Files
Refs
---
dwm-noborder-6.1.diff (2347B)
---
1 diff --git a/dwm.c b/dwm.c
2 index 0362114..e3209e5 100644
3 --- a/dwm.c
4 +++ b/dwm.c
5 @@ -393,9 +393,24 @@ arrange(Monitor *m)
6 void
7 arrangemon(Monitor *m)
8 {
9 + int n = 0;
10 + Client *c;
11 strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbo…
12 - if (m->lt[m->sellt]->arrange)
13 - m->lt[m->sellt]->arrange(m);
14 + for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next…
15 + if ((m->lt[m->sellt]->arrange != monocle && n > 1) || !m->lt[m-…
16 + for (c = m->clients; c; c = c->next) {
17 + if (ISVISIBLE(c) && (!m->lt[m->sellt]->arrange …
18 + c->oldbw = c->bw;
19 + c->bw = borderpx;
20 + resizeclient(c, m->wx, m->wy, m->ww - (…
21 + }
22 + }
23 + if (m->lt[m->sellt]->arrange) {
24 + m->lt[m->sellt]->arrange(m);
25 + }
26 + } else {
27 + monocle(m);
28 + }
29 }
30
31 void
32 @@ -1123,10 +1138,19 @@ monocle(Monitor *m)
33 for (c = m->clients; c; c = c->next)
34 if (ISVISIBLE(c))
35 n++;
36 - if (n > 0) /* override layout symbol */
37 + if (n > 0 && m->lt[m->sellt]->arrange == monocle) /* override l…
38 snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
39 - for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
40 - resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * …
41 + for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
42 + // I'm not sure, but calling resize with the border wid…
43 + // fixes a glitch where windows would not redraw until …
44 + // manually resized after restarting dwm.
45 + resize(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2…
46 + if (c->bw) {
47 + c->oldbw = c->bw;
48 + c->bw = 0;
49 + resizeclient(c, m->wx, m->wy, m->ww, m->wh);
50 + }
51 + }
52 }
53
54 void
55 @@ -1706,9 +1730,14 @@ togglefloating(const Arg *arg)
56 if (selmon->sel->isfullscreen) /* no support for fullscreen win…
57 return;
58 selmon->sel->isfloating = !selmon->sel->isfloating || selmon->s…
59 - if (selmon->sel->isfloating)
60 + if (selmon->sel->isfloating) {
61 + if (selmon->sel->bw != borderpx) {
62 + selmon->sel->oldbw = selmon->sel->bw;
63 + selmon->sel->bw = borderpx;
64 + }
65 resize(selmon->sel, selmon->sel->x, selmon->sel->y,
66 - selmon->sel->w, selmon->sel->h, 0);
67 + selmon->sel->w - selmon->sel->bw * 2, selmon->se…
68 + }
69 arrange(selmon);
70 }
71
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.