about summary refs log tree commit diff stats
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'client.c')
-rw-r--r--client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/client.c b/client.c
index f4ed1a0..91d031e 100644
--- a/client.c
+++ b/client.c
@@ -16,7 +16,7 @@ resizetitle(Client *c)
 	int i;
 
 	c->tw = 0;
-	for(i = 0; i < TLast; i++)
+	for(i = 0; i < ntags; i++)
 		if(c->tags[i])
 			c->tw += textw(tags[i]);
 	c->tw += textw(c->name);
@@ -211,6 +211,7 @@ manage(Window w, XWindowAttributes *wa)
 	XSetWindowAttributes twa;
 
 	c = emallocz(sizeof(Client));
+	c->tags = emallocz(ntags * sizeof(Bool));
 	c->win = w;
 	c->x = c->tx = wa->x;
 	c->y = c->ty = wa->y;
@@ -429,6 +430,7 @@ unmanage(Client *c)
 		if(!sel)
 			sel = clients;
 	}
+	free(c->tags);
 	free(c);
 
 	XSync(dpy, False);
f4a02971f712964cb2fd1014d2a75d33'>^
327b7c16 ^
1367261d ^




327b7c16 ^
1367261d ^


b223937f ^
1367261d ^





b223937f ^

1367261d ^



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