diff --git a/rules.c b/rules.c index 42c20bb1..303419d8 100644 --- a/rules.c +++ b/rules.c @@ -65,11 +65,11 @@ get_client_screen_from_rules(Client *c, Rule *rules) } Bool -is_client_tag_from_rules(Client *c, Tag *t, Rule *r) +is_tag_match_rules(Tag *t, Rule *r) { regmatch_t tmp; - if(!regexec(r->tagregex, t->name, 1, &tmp, 0)) + if(r->tagregex && !regexec(r->tagregex, t->name, 1, &tmp, 0)) return True; return False; diff --git a/rules.h b/rules.h index 116acb49..da160672 100644 --- a/rules.h +++ b/rules.h @@ -28,7 +28,7 @@ Bool client_match_rule(Client *, Rule *); int get_client_screen_from_rules(Client *, Rule *); -Bool is_client_tag_from_rules(Client *, Tag *, Rule *); +Bool is_tag_match_rules(Tag *, Rule *); #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99