added wild-card handling for tags 71681c21
Anselm R Garbe · 2008-05-15 10:47 1 file(s) · +6 −2
dwm.c +6 −2
240 240
241 241
void
242 242
applyrules(Client *c) {
243 -
	unsigned int i;
243 +
	unsigned int i, j;
244 244
	Bool matched = False;
245 245
	Rule *r;
246 246
	XClassHint ch = { 0 };
254 254
		&& (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
255 255
			c->isfloating = r->isfloating;
256 256
			if(r->tag) {
257 -
				c->tags[idxoftag(r->tag)] = True;
257 +
				if(r->tag[0] == '*' && r->tag[1] == 0)
258 +
					for(j = 0; j < LENGTH(tags); i++)
259 +
						c->tags[j] = True;
260 +
				else
261 +
					c->tags[idxoftag(r->tag)] = True;
258 262
				matched = True;
259 263
			}
260 264
		}