dwm-meillo

changeset 718:09452e717bfd

applied offscreen appearance hotfix
author Anselm R. Garbe <arg@suckless.org>
date Wed, 24 Jan 2007 17:24:55 +0100
parents 7a65648a2c88
children f2cabc83a18f
files client.c
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line diff
     1.1 --- a/client.c	Wed Jan 24 12:12:29 2007 +0100
     1.2 +++ b/client.c	Wed Jan 24 17:24:55 2007 +0100
     1.3 @@ -142,14 +142,14 @@
     1.4  	}
     1.5  	else {
     1.6  		c->border = BORDERPX;
     1.7 +		if(c->x + c->w + 2 * c->border > wax + waw)
     1.8 +			c->x = wax + waw - c->w - 2 * c->border;
     1.9 +		if(c->y + c->h + 2 * c->border > way + wah)
    1.10 +			c->y = way + wah - c->h - 2 * c->border;
    1.11  		if(c->x < wax)
    1.12  			c->x = wax;
    1.13  		if(c->y < way)
    1.14  			c->y = way;
    1.15 -		if(c->x + c->w + 2 * c->border > wax + waw)
    1.16 -			c->x = wax + waw - c->w - 2 * c->border;
    1.17 -		if(c->y + c->h + 2 * c->border > way + wah)
    1.18 -			c->y = way + wah - c->h - 2 * c->border;
    1.19  	}
    1.20  	updatesizehints(c);
    1.21  	c->proto = getproto(c->win);
    1.22 @@ -197,14 +197,14 @@
    1.23  	else
    1.24  		c->border = BORDERPX;
    1.25  	/* offscreen appearance fixes */
    1.26 +	if(c->x > sw)
    1.27 +		c->x = sw - c->w - 2 * c->border;
    1.28 +	if(c->y > sh)
    1.29 +		c->y = sh - c->h - 2 * c->border;
    1.30  	if(c->x + c->w + 2 * c->border < sx)
    1.31  		c->x = sx;
    1.32  	if(c->y + c->h + 2 * c->border < sy)
    1.33  		c->y = sy;
    1.34 -	if(c->x > sw)
    1.35 -		c->x = sw - c->w - 2 * c->border;
    1.36 -	if(c->y > sh)
    1.37 -		c->y = sh - c->h - 2 * c->border;
    1.38  	wc.x = c->x;
    1.39  	wc.y = c->y;
    1.40  	wc.width = c->w;