added wild-card handling for tags

This commit is contained in:
Anselm R Garbe 2008-05-15 10:47:26 +01:00
parent 704781875c
commit 71681c21a5

8
dwm.c
View file

@ -240,7 +240,7 @@ Window root, barwin;
void void
applyrules(Client *c) { applyrules(Client *c) {
unsigned int i; unsigned int i, j;
Bool matched = False; Bool matched = False;
Rule *r; Rule *r;
XClassHint ch = { 0 }; XClassHint ch = { 0 };
@ -254,7 +254,11 @@ applyrules(Client *c) {
&& (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) { && (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
c->isfloating = r->isfloating; c->isfloating = r->isfloating;
if(r->tag) { if(r->tag) {
c->tags[idxoftag(r->tag)] = True; if(r->tag[0] == '*' && r->tag[1] == 0)
for(j = 0; j < LENGTH(tags); i++)
c->tags[j] = True;
else
c->tags[idxoftag(r->tag)] = True;
matched = True; matched = True;
} }
} }