bug fix: XClassHint not copied correctly
Thanks Nikos Ntarmos <ntarmos@ceid.upatras.gr>
This commit is contained in:
parent
30c9d74dd2
commit
ab738c9cab
9
tag.c
9
tag.c
|
@ -67,13 +67,14 @@ applyrules(Client * c, awesome_config *awesomeconf)
|
||||||
XClassHint ch = { 0, 0 };
|
XClassHint ch = { 0, 0 };
|
||||||
char *prop;
|
char *prop;
|
||||||
|
|
||||||
len += a_strlen(ch.res_class) + a_strlen(ch.res_name) + a_strlen(c->name);
|
XGetClassHint(c->display, c->win, &ch);
|
||||||
|
|
||||||
prop = p_new(char, len + 1);
|
len = a_strlen(ch.res_class) + a_strlen(ch.res_name) + a_strlen(c->name);
|
||||||
|
|
||||||
|
prop = p_new(char, len + 3);
|
||||||
|
|
||||||
/* rule matching */
|
/* rule matching */
|
||||||
XGetClassHint(c->display, c->win, &ch);
|
snprintf(prop, len + 3, "%s:%s:%s",
|
||||||
snprintf(prop, len + 1, "%s:%s:%s",
|
|
||||||
ch.res_class ? ch.res_class : "", ch.res_name ? ch.res_name : "", c->name);
|
ch.res_class ? ch.res_class : "", ch.res_name ? ch.res_name : "", c->name);
|
||||||
for(i = 0; i < awesomeconf->nrules; i++)
|
for(i = 0; i < awesomeconf->nrules; i++)
|
||||||
if(regs[i].propregex && !regexec(regs[i].propregex, prop, 1, &tmp, 0))
|
if(regs[i].propregex && !regexec(regs[i].propregex, prop, 1, &tmp, 0))
|
||||||
|
|
Loading…
Reference in New Issue