aewl

diff tag.c @ 431:a230e4432bb7

moved transient_for tag inheritance to settags
author Anselm R. Garbe <arg@10kloc.org>
date Wed, 06 Sep 2006 09:21:17 +0200
parents 1e8aba00964e
children 9d73c8298b2e
line diff
     1.1 --- a/tag.c	Wed Sep 06 09:13:31 2006 +0200
     1.2 +++ b/tag.c	Wed Sep 06 09:21:17 2006 +0200
     1.3 @@ -76,15 +76,19 @@
     1.4  }
     1.5  
     1.6  void
     1.7 -settags(Client *c)
     1.8 +settags(Client *c, Client *trans)
     1.9  {
    1.10  	char prop[512];
    1.11  	unsigned int i, j;
    1.12  	regmatch_t tmp;
    1.13 -	Bool matched = False;
    1.14 +	Bool matched = trans != NULL;
    1.15  	XClassHint ch;
    1.16  
    1.17 -	if(XGetClassHint(dpy, c->win, &ch)) {
    1.18 +	if(matched) {
    1.19 +		for(i = 0; i < ntags; i++)
    1.20 +			c->tags[i] = trans->tags[i];
    1.21 +	}
    1.22 +	else if(XGetClassHint(dpy, c->win, &ch)) {
    1.23  		snprintf(prop, sizeof(prop), "%s:%s:%s",
    1.24  				ch.res_class ? ch.res_class : "",
    1.25  				ch.res_name ? ch.res_name : "", c->name);