aewl

diff tag.c @ 336:2a65e8b3d21a

implemented class:inst:title matching
author Anselm R. Garbe <arg@10kloc.org>
date Wed, 23 Aug 2006 12:08:37 +0200
parents 96d09fd98e89
children ae0affabdc02
line diff
     1.1 --- a/tag.c	Wed Aug 23 12:03:25 2006 +0200
     1.2 +++ b/tag.c	Wed Aug 23 12:08:37 2006 +0200
     1.3 @@ -78,18 +78,18 @@
     1.4  void
     1.5  settags(Client *c)
     1.6  {
     1.7 -	char classinst[256];
     1.8 +	char prop[512];
     1.9  	unsigned int i, j;
    1.10  	regmatch_t tmp;
    1.11  	Bool matched = False;
    1.12  	XClassHint ch;
    1.13  
    1.14  	if(XGetClassHint(dpy, c->win, &ch)) {
    1.15 -		snprintf(classinst, sizeof(classinst), "%s:%s",
    1.16 +		snprintf(prop, sizeof(prop), "%s:%s:%s",
    1.17  				ch.res_class ? ch.res_class : "",
    1.18 -				ch.res_name ? ch.res_name : "");
    1.19 +				ch.res_name ? ch.res_name : "", c->name);
    1.20  		for(i = 0; !matched && i < len; i++)
    1.21 -			if(rreg[i].clregex && !regexec(rreg[i].clregex, classinst, 1, &tmp, 0)) {
    1.22 +			if(rreg[i].clregex && !regexec(rreg[i].clregex, prop, 1, &tmp, 0)) {
    1.23  				c->isfloat = rule[i].isfloat;
    1.24  				for(j = 0; rreg[i].tregex && j < ntags; j++) {
    1.25  					if(!regexec(rreg[i].tregex, tags[j], 1, &tmp, 0)) {