about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--dwm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/dwm.c b/dwm.c
index 277f561..50f4ea0 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1569,7 +1569,7 @@ textw(const char *text) {
 void
 tile(void) {
 	unsigned int i, n, nx, ny, nw, nh, mw, th;
-	Client *c;
+	Client *c, *mc;
 
 	for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
 		n++;
@@ -1582,7 +1582,8 @@ tile(void) {
 
 	nx = wax;
 	ny = way;
-	for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next), i++) {
+	nw = 0; /* gcc stupidity requires this */
+	for(i = 0, c = mc = nexttiled(clients); c; c = nexttiled(c->next), i++) {
 		c->ismax = False;
 		if(i == 0) { /* master */
 			nw = mw - 2 * c->border;
@@ -1591,9 +1592,9 @@ tile(void) {
 		else {  /* tile window */
 			if(i == 1) {
 				ny = way;
-				nx += mw;
+				nx += mc->w + 2 * mc->border;
+				nw = waw - nx - 2 * c->border;
 			}
-			nw = waw - mw - 2 * c->border;
 			if(i + 1 == n) /* remainder */
 				nh = (way + wah) - ny - 2 * c->border;
 			else
@@ -1601,7 +1602,7 @@ tile(void) {
 		}
 		resize(c, nx, ny, nw, nh, RESIZEHINTS);
 		if(n > 1 && th != wah)
-			ny += nh + 2 * c->border;
+			ny = c->y + c->h + 2 * c->border;
 	}
 }
 
.html?id=f07bb12fc5c59430e995a64956b36331ce3629b9'>f07bb12f ^
4c13e1f2 ^
f07bb12f ^
34a60763 ^
f07bb12f ^



















4c13e1f2 ^
f07bb12f ^




4c13e1f2 ^

f07bb12f ^


4c13e1f2 ^

f07bb12f ^
4c13e1f2 ^
f07bb12f ^












f07bb12f ^















4c13e1f2 ^




34a60763 ^
4c13e1f2 ^
34a60763 ^
4c13e1f2 ^



f07bb12f ^
34a60763 ^
f07bb12f ^









34a60763 ^
f07bb12f ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138