aewl

diff client.c @ 178:e848966a1ac6

removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
author arg@10ksloc.org
date Thu, 03 Aug 2006 12:12:26 +0200
parents 1db04019684e
children ac90e9e4b9c9
line diff
     1.1 --- a/client.c	Thu Aug 03 11:38:26 2006 +0200
     1.2 +++ b/client.c	Thu Aug 03 12:12:26 2006 +0200
     1.3 @@ -16,7 +16,7 @@
     1.4  	int i;
     1.5  
     1.6  	c->tw = 0;
     1.7 -	for(i = 0; i < TLast; i++)
     1.8 +	for(i = 0; i < ntags; i++)
     1.9  		if(c->tags[i])
    1.10  			c->tw += textw(tags[i]);
    1.11  	c->tw += textw(c->name);
    1.12 @@ -211,6 +211,7 @@
    1.13  	XSetWindowAttributes twa;
    1.14  
    1.15  	c = emallocz(sizeof(Client));
    1.16 +	c->tags = emallocz(ntags * sizeof(Bool));
    1.17  	c->win = w;
    1.18  	c->x = c->tx = wa->x;
    1.19  	c->y = c->ty = wa->y;
    1.20 @@ -429,6 +430,7 @@
    1.21  		if(!sel)
    1.22  			sel = clients;
    1.23  	}
    1.24 +	free(c->tags);
    1.25  	free(c);
    1.26  
    1.27  	XSync(dpy, False);