about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--dwm.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/dwm.c b/dwm.c
index de20b36..7684646 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1276,7 +1276,6 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
 	XWindowChanges wc;
 
 	m = c->monitor;
-
 	if(sizehints) {
 		/* set minimum possible */
 		if (w < 1)
@@ -1325,6 +1324,7 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
 		x = m->sx;
 	if(y + h + 2 * c->border < m->sy)
 		y = m->sy;
+	fprintf(stderr, "resize %d %d %d %d (%d %d %d %d)\n", x, y , w, h, m->sx, m->sy, m->sw, m->sh);
 	if(c->x != x || c->y != y || c->w != w || c->h != h) {
 		c->x = wc.x = x;
 		c->y = wc.y = y;
@@ -1605,7 +1605,7 @@ setup(void) {
 		m = &monitors[i];
 		m->id = i;
 
-		if (mcount != 1 && isxinerama) {
+		if(mcount != 1 && isxinerama) {
 			m->sx = info[i].x_org;
 			m->sy = info[i].y_org;
 			m->sw = info[i].width;
@@ -1727,9 +1727,9 @@ tile(Monitor *m) {
 	Client *c, *mc;
 
 	domwfact = dozoom = True;
-
-	nx = ny = nw = 0; /* gcc stupidity requires this */
-
+	nx = m->wax;
+	ny = m->way;
+	nw = 0;
 	for(n = 0, c = nexttiled(clients, m); c; c = nexttiled(c->next, m))
 		n++;
 
@@ -1757,16 +1757,17 @@ tile(Monitor *m) {
 			else
 				nh = th - 2 * c->border;
 		}
+		fprintf(stderr, "tile %d %d %d %d\n", nx, ny, nw, nh);
 		resize(c, nx, ny, nw, nh, RESIZEHINTS);
 		if((RESIZEHINTS) && ((c->h < bh) || (c->h > nh) || (c->w < bh) || (c->w > nw)))
 			/* client doesn't accept size constraints */
 			resize(c, nx, ny, nw, nh, False);
 		if(n > 1 && th != m->wah)
 			ny = c->y + c->h + 2 * c->border;
-
 		i++;
 	}
 }
+
 void
 togglebar(const char *arg) {
 	if(bpos == BarOff)
@@ -1824,6 +1825,7 @@ unban(Client *c) {
 
 void
 unmanage(Client *c) {
+	Monitor *m = c->monitor;
 	XWindowChanges wc;
 
 	wc.border_width = c->oldborder;
@@ -1842,7 +1844,7 @@ unmanage(Client *c) {
 	XSync(dpy, False);
 	XSetErrorHandler(xerror);
 	XUngrabServer(dpy);
-	arrange(NULL);
+	arrange(m);
 }
 
 void
f28f0cd08'>^
2e95837 ^

c917018 ^

2e95837 ^
c917018 ^
2e95837 ^

c917018 ^



2e95837 ^

c917018 ^



2e95837 ^
39af3c2 ^
295ad21 ^
00ca643 ^
fe2775a ^
d517829 ^

a3d8c05 ^


f196b71 ^
3794c62 ^
f196b71 ^
6f60b2e ^
8d1810c ^
39af3c2 ^
fe2775a ^
c917018 ^
d7b074f ^



3794c62 ^

f196b71 ^

e9a0733 ^

b31b430 ^



e9a0733 ^
308f95a ^
b31b430 ^
e9a0733 ^
e9a0733 ^

d66ad14 ^
e9a0733 ^

2e95837 ^

d7b074f ^

e9a0733 ^








































b515765 ^
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