diff options
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -16,7 +16,7 @@ resizetitle(Client *c) | |||
| 16 | int i; | 16 | int i; |
| 17 | 17 | ||
| 18 | c->tw = 0; | 18 | c->tw = 0; |
| 19 | for(i = 0; i < TLast; i++) | 19 | for(i = 0; i < ntags; i++) |
| 20 | if(c->tags[i]) | 20 | if(c->tags[i]) |
| 21 | c->tw += textw(tags[i]); | 21 | c->tw += textw(tags[i]); |
| 22 | c->tw += textw(c->name); | 22 | c->tw += textw(c->name); |
| @@ -211,6 +211,7 @@ manage(Window w, XWindowAttributes *wa) | |||
| 211 | XSetWindowAttributes twa; | 211 | XSetWindowAttributes twa; |
| 212 | 212 | ||
| 213 | c = emallocz(sizeof(Client)); | 213 | c = emallocz(sizeof(Client)); |
| 214 | c->tags = emallocz(ntags * sizeof(Bool)); | ||
| 214 | c->win = w; | 215 | c->win = w; |
| 215 | c->x = c->tx = wa->x; | 216 | c->x = c->tx = wa->x; |
| 216 | c->y = c->ty = wa->y; | 217 | c->y = c->ty = wa->y; |
| @@ -429,6 +430,7 @@ unmanage(Client *c) | |||
| 429 | if(!sel) | 430 | if(!sel) |
| 430 | sel = clients; | 431 | sel = clients; |
| 431 | } | 432 | } |
| 433 | free(c->tags); | ||
| 432 | free(c); | 434 | free(c); |
| 433 | 435 | ||
| 434 | XSync(dpy, False); | 436 | XSync(dpy, False); |
