dwm-meillo

changeset 104:3a708f113f55

implemented fallback for too many clients in stacked mode
author arg@10ksloc.org
date Wed, 19 Jul 2006 13:36:04 +0200
parents 130d49140341
children 3e74cc981e9b
files client.c tag.c
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/client.c	Wed Jul 19 13:30:18 2006 +0200
     1.2 +++ b/client.c	Wed Jul 19 13:36:04 2006 +0200
     1.3 @@ -201,8 +201,6 @@
     1.4  	c->win = w;
     1.5  	c->bx = c->fx = c->tx = wa->x;
     1.6  	c->by = c->fy = c->ty = wa->y;
     1.7 -	if(c->fy < bh)
     1.8 -		c->by = c->fy = c->ty += bh;
     1.9  	c->bw = c->fw = c->tw = wa->width;
    1.10  	c->fh = c->th = wa->height;
    1.11  	c->bh = bh;
    1.12 @@ -212,6 +210,9 @@
    1.13  	diff = sh - c->fh - bh;
    1.14  	c->fy = random() % (diff ? diff : 1);
    1.15  
    1.16 +	if(c->fy < bh)
    1.17 +		c->by = c->fy = c->ty = bh;
    1.18 +
    1.19  	c->border = 1;
    1.20  	c->proto = getproto(c->win);
    1.21  	setsize(c);
     2.1 --- a/tag.c	Wed Jul 19 13:30:18 2006 +0200
     2.2 +++ b/tag.c	Wed Jul 19 13:36:04 2006 +0200
     2.3 @@ -96,12 +96,18 @@
     2.4  				*c->w = mw - 2 * c->border;
     2.5  				*c->h = sh - 2 * c->border - bh;
     2.6  			}
     2.7 -			else {
     2.8 +			else if(h > bh) {
     2.9  				*c->x = sx + mw;
    2.10  				*c->y = sy + (i - 1) * h + bh;
    2.11  				*c->w = w - 2 * c->border;
    2.12  				*c->h = h - 2 * c->border;
    2.13  			}
    2.14 +			else { /* fallback if h < bh */
    2.15 +				*c->x = sx + mw;
    2.16 +				*c->y = sy + bh;
    2.17 +				*c->w = w - 2 * c->border;
    2.18 +				*c->h = sh - 2 * c->border - bh;
    2.19 +			}
    2.20  			resize(c, False, TopLeft);
    2.21  			i++;
    2.22  		}