diff layout.c @ 3:faa4cb9d7bd6

add TASKBAR and CLICK_TO_FOCUS
author paulo@localhost
date Thu, 23 Apr 2009 02:43:13 -0700
parents ba504f41828f
children e060ab82b136
line diff
     1.1 --- a/layout.c	Tue Mar 24 12:52:45 2009 -0700
     1.2 +++ b/layout.c	Thu Apr 23 02:43:13 2009 -0700
     1.3 @@ -233,8 +233,8 @@
     1.4  			break;
     1.5  	cols = (rows && (rows - 1) * rows >= n) ? rows - 1 : rows;
     1.6  	
     1.7 -	th = (sh - dc.h) / (rows ? rows : 1);
     1.8 -	tw = sw / (cols ? cols : 1);
     1.9 +	th = wah / (rows ? rows : 1);
    1.10 +	tw = waw / (cols ? cols : 1);
    1.11  	nw = tw - 2 * BORDERPX;
    1.12  	nh = th - 2 * BORDERPX;
    1.13  	
    1.14 @@ -249,8 +249,8 @@
    1.15  			nx = (i / rows) * tw;
    1.16  			ny = (i % rows) * th + (TOPBAR ? dc.h : 0);
    1.17  			/* adjust height and width of last row's and last column's windows */ 
    1.18 -			ah = ((i + 1) % rows == 0) ? sh - th * rows - dc.h : 0;
    1.19 -			aw = (i >= rows * (cols - 1)) ? sw - tw * cols : 0;
    1.20 +			ah = ((i + 1) % rows == 0) ? wah - th * rows : 0;
    1.21 +			aw = (i >= rows * (cols - 1)) ? waw - tw * cols : 0;
    1.22  			resize(c, nx, ny, nw + aw, nh + ah, False);
    1.23  			i++;
    1.24  		}