diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2008-05-19 17:23:49 +0100 | 
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2008-05-19 17:23:49 +0100 | 
| commit | 234b12eb73f5c6de3da4eb93cac2159e73647529 (patch) | |
| tree | 326b0232bb552ae90ed3ecfb526c64151ffa2f0c | |
| parent | bd4deaebfc3bbcd72c032a5525c9f35e73e8a98e (diff) | |
| download | dwm-234b12eb73f5c6de3da4eb93cac2159e73647529.tar.gz | |
be more polite to clients which like to appear outside the window area, but still on the screen
| -rw-r--r-- | dwm.c | 12 | 
1 files changed, 6 insertions, 6 deletions
| @@ -958,12 +958,12 @@ manage(Window w, XWindowAttributes *wa) {  		c->bw = wa->border_width;  	}  	else { -		if(c->x + c->w + 2 * c->bw > wx + ww) -			c->x = wx + ww - c->w - 2 * c->bw; -		if(c->y + c->h + 2 * c->bw > wy + wh) -			c->y = wy + wh - c->h - 2 * c->bw; -		c->x = MAX(c->x, wx); -		c->y = MAX(c->y, wy); +		if(c->x + c->w + 2 * c->bw > sx + sw) +			c->x = sx + sw - c->w - 2 * c->bw; +		if(c->y + c->h + 2 * c->bw > sy + sh) +			c->y = sy + sh - c->h - 2 * c->bw; +		c->x = MAX(c->x, sx); +		c->y = MAX(c->y, sy);  		c->bw = borderpx;  	} | 
