dwm-meillo

diff tag.c @ 138:c1185dc7a36e

some cleanups/fixes inspired by Jukka Salmi's feedback
author arg@10ksloc.org
date Fri, 21 Jul 2006 18:34:10 +0200
parents 30d1302dbe3b
children 9b9deafa0508
line diff
     1.1 --- a/tag.c	Fri Jul 21 14:11:38 2006 +0200
     1.2 +++ b/tag.c	Fri Jul 21 18:34:10 2006 +0200
     1.3 @@ -165,18 +165,13 @@
     1.4  settags(Client *c)
     1.5  {
     1.6  	char classinst[256];
     1.7 -	static unsigned int len = rule ? sizeof(rule) / sizeof(rule[0]) : 0;
     1.8 +	static unsigned int len = sizeof(rule) / sizeof(rule[0]);
     1.9  	unsigned int i, j;
    1.10  	regex_t regex;
    1.11  	regmatch_t tmp;
    1.12  	Bool matched = False;
    1.13  	XClassHint ch;
    1.14  
    1.15 -	if(!len) {
    1.16 -		c->tags[tsel] = tags[tsel];
    1.17 -		return;
    1.18 -	}
    1.19 -
    1.20  	if(XGetClassHint(dpy, c->win, &ch)) {
    1.21  		snprintf(classinst, sizeof(classinst), "%s:%s",
    1.22  				ch.res_class ? ch.res_class : "",