aewl

diff view.c @ 682:76b58d21ea98

removing to allow nmaster=0
author Anselm R. Garbe <arg@suckless.org>
date Fri, 12 Jan 2007 12:15:06 +0100
parents 4dcbbfe9d137
children a76799907854
line diff
     1.1 --- a/view.c	Thu Jan 11 16:38:45 2007 +0100
     1.2 +++ b/view.c	Fri Jan 12 12:15:06 2007 +0100
     1.3 @@ -75,14 +75,9 @@
     1.4  
     1.5  	for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
     1.6  		n++;
     1.7 -
     1.8  	/* window geoms */
     1.9 -	if(nmaster > 0) {
    1.10 -		mh = (n > nmaster) ?  wah / nmaster : wah / (n > 0 ? n : 1);
    1.11 -		mw = (n > nmaster) ? (waw * master) / 1000 : waw;
    1.12 -	}
    1.13 -	else
    1.14 -		mh = mw = 0;
    1.15 +	mh = (n > nmaster) ? wah / nmaster : wah / (n > 0 ? n : 1);
    1.16 +	mw = (n > nmaster) ? (waw * master) / 1000 : waw;
    1.17  	th = (n > nmaster) ? wah / (n - nmaster) : 0;
    1.18  	tw = waw - mw;
    1.19  
    1.20 @@ -95,7 +90,7 @@
    1.21  			c->ismax = False;
    1.22  			c->x = wax;
    1.23  			c->y = way;
    1.24 -			if((nmaster > 0) && (i < nmaster)) {
    1.25 +			if(i < nmaster) {
    1.26  				c->y += i * mh;
    1.27  				c->w = mw - 2 * BORDERPX;
    1.28  				c->h = mh - 2 * BORDERPX;
    1.29 @@ -155,9 +150,7 @@
    1.30  
    1.31  void
    1.32  incnmaster(Arg *arg) {
    1.33 -	if((arrange == dofloat)
    1.34 -	|| ((int)nmaster + arg->i < 0)
    1.35 -	|| (((int)nmaster + arg->i > 0) && (wah / (nmaster + arg->i) < bh)))
    1.36 +	if((arrange == dofloat) || (nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh))
    1.37  		return;
    1.38  	nmaster += arg->i;
    1.39  	updatemodetext();