aewl

changeset 465:590575d080fe

offscreen client appearance fixes
author arg@mmvi
date Fri, 15 Sep 2006 10:54:32 +0200
parents bd32d89ed9d5
children ad3fa2d18542
files client.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/client.c	Fri Sep 15 10:49:05 2006 +0200
     1.2 +++ b/client.c	Fri Sep 15 10:54:32 2006 +0200
     1.3 @@ -281,6 +281,16 @@
     1.4  	if(sticky == BotLeft || sticky == BotRight)
     1.5  		c->y = bottom - c->h;
     1.6  
     1.7 +	/* offscreen appearance fixes */
     1.8 +	if(c->x + c->w < 0)
     1.9 +		c->x = 0;
    1.10 +	if(c->y + c->h < bh)
    1.11 +		c->y = bh;
    1.12 +	if(c->x > sw)
    1.13 +		c->x = sw - c->w;
    1.14 +	if(c->y > sh)
    1.15 +		c->y = sh - c->h;
    1.16 +
    1.17  	resizetitle(c);
    1.18  	wc.x = c->x;
    1.19  	wc.y = c->y;