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 wrap: on
line diff
--- a/tag.c	Wed Aug 23 12:03:25 2006 +0200
+++ b/tag.c	Wed Aug 23 12:08:37 2006 +0200
@@ -78,18 +78,18 @@
 void
 settags(Client *c)
 {
-	char classinst[256];
+	char prop[512];
 	unsigned int i, j;
 	regmatch_t tmp;
 	Bool matched = False;
 	XClassHint ch;
 
 	if(XGetClassHint(dpy, c->win, &ch)) {
-		snprintf(classinst, sizeof(classinst), "%s:%s",
+		snprintf(prop, sizeof(prop), "%s:%s:%s",
 				ch.res_class ? ch.res_class : "",
-				ch.res_name ? ch.res_name : "");
+				ch.res_name ? ch.res_name : "", c->name);
 		for(i = 0; !matched && i < len; i++)
-			if(rreg[i].clregex && !regexec(rreg[i].clregex, classinst, 1, &tmp, 0)) {
+			if(rreg[i].clregex && !regexec(rreg[i].clregex, prop, 1, &tmp, 0)) {
 				c->isfloat = rule[i].isfloat;
 				for(j = 0; rreg[i].tregex && j < ntags; j++) {
 					if(!regexec(rreg[i].tregex, tags[j], 1, &tmp, 0)) {