dwm-meillo

diff view.c @ 721:d3876aa79292

prepared yet another hotfix release
author Anselm R. Garbe <arg@suckless.org>
date Thu, 25 Jan 2007 09:59:48 +0100
parents a2d568a5cdb8
children 0f91934037b0
line diff
     1.1 --- a/view.c	Wed Jan 24 17:25:37 2007 +0100
     1.2 +++ b/view.c	Thu Jan 25 09:59:48 2007 +0100
     1.3 @@ -98,11 +98,11 @@
     1.4  			else {  /* tile window */
     1.5  				c->x += mw;
     1.6  				c->w = tw - 2 * BORDERPX;
     1.7 -				if(th > bh) {
     1.8 +				if(th - 2 * BORDERPX > bh) {
     1.9  					c->y += (i - nmaster) * th;
    1.10  					c->h = th - 2 * BORDERPX;
    1.11  				}
    1.12 -				else /* fallback if th < bh */
    1.13 +				else /* fallback if th - 2 * BORDERPX < bh */
    1.14  					c->h = wah - 2 * BORDERPX;
    1.15  			}
    1.16  			resize(c, False);
    1.17 @@ -149,7 +149,8 @@
    1.18  
    1.19  void
    1.20  incnmaster(Arg *arg) {
    1.21 -	if((arrange == dofloat) || (nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh))
    1.22 +	if((arrange == dofloat) || (nmaster + arg->i < 1)
    1.23 +		|| (wah / (nmaster + arg->i) - 2 * BORDERPX < bh))
    1.24  		return;
    1.25  	nmaster += arg->i;
    1.26  	if(sel)
    1.27 @@ -173,7 +174,8 @@
    1.28  	if(arg->i == 0)
    1.29  		master = MASTER;
    1.30  	else {
    1.31 -		if(master + arg->i > 950 || master + arg->i < 50)
    1.32 +		if(waw * (master + arg->i) / 1000 > waw - bh - 2 * BORDERPX
    1.33 +			|| waw * (master + arg->i) / 1000 < bh + 2 * BORDERPX)
    1.34  			return;
    1.35  		master += arg->i;
    1.36  	}