aewl

diff client.c @ 311:099c595c53e6

centering apps only if transient_for is not(!) set
author Anselm R.Garbe <arg@10ksloc.org>
date Thu, 17 Aug 2006 09:37:43 +0200
parents f0b609fca3de
children 8b109976c594
line diff
     1.1 --- a/client.c	Thu Aug 17 09:35:44 2006 +0200
     1.2 +++ b/client.c	Thu Aug 17 09:37:43 2006 +0200
     1.3 @@ -258,15 +258,7 @@
     1.4  				c->maxw == c->minw && c->maxh == c->minh);
     1.5  	settitle(c);
     1.6  
     1.7 -	if(trans && (tc = getclient(trans))) {
     1.8 -		c->x = (tc->x + tc->w / 2) - (c->w / 2);
     1.9 -		c->y = (tc->y + tc->h / 2) - (c->h / 2);
    1.10 -		if((c->x + c->w < 0) || (c->x >= sw))
    1.11 -			c->x = (sw / 2) - (c->w / 2);
    1.12 -		if((c->y + c->h < 0) || (c->y >= sh))
    1.13 -			c->y = ((sh - bh) / 2) - (c->h / 2) + bh;
    1.14 -	}
    1.15 -	else {
    1.16 +	if(!trans) {
    1.17  		c->x = (sw / 2) - (c->w / 2);
    1.18  		c->y = ((sh - bh) / 2) - (c->h / 2) + bh;
    1.19  	}