aewl
diff view.c @ 565:fe766305eed1
applied Gottox' windowarea patch
author | arg@mig29 |
---|---|
date | Thu, 16 Nov 2006 14:40:57 +0100 |
parents | b5435d3fb7b0 |
children | 797e27162b43 |
line diff
1.1 --- a/view.c Wed Nov 08 17:16:38 2006 +0100 1.2 +++ b/view.c Thu Nov 16 14:40:57 2006 +0100 1.3 @@ -49,10 +49,10 @@ 1.4 return; 1.5 1.6 if((c->ismax = !c->ismax)) { 1.7 - c->rx = c->x; c->x = sx; 1.8 - c->ry = c->y; c->y = bh; 1.9 - c->rw = c->w; c->w = sw - 2 * BORDERPX; 1.10 - c->rh = c->h; c->h = sh - bh - 2 * BORDERPX; 1.11 + c->rx = c->x; c->x = wax; 1.12 + c->ry = c->y; c->y = way; 1.13 + c->rw = c->w; c->w = waw - 2 * BORDERPX; 1.14 + c->rh = c->h; c->h = wah - 2 * BORDERPX; 1.15 } 1.16 else { 1.17 c->x = c->rx; 1.18 @@ -99,17 +99,13 @@ 1.19 1.20 void 1.21 dotile(void) { 1.22 - unsigned int i, n, mpx, stackw, stackh, th; 1.23 + unsigned int i, n, mpx, stackw, th; 1.24 Client *c; 1.25 1.26 for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) 1.27 n++; 1.28 - mpx = (sw * master) / 1000; 1.29 - stackw = sw - mpx; 1.30 - stackh = sh - bh; 1.31 - th = stackh; 1.32 - if(n > 1) 1.33 - th /= (n - 1); 1.34 + mpx = (waw * master) / 1000; 1.35 + stackw = waw - mpx; 1.36 1.37 for(i = 0, c = clients; c; c = c->next) 1.38 if(isvisible(c)) { 1.39 @@ -118,28 +114,26 @@ 1.40 continue; 1.41 } 1.42 c->ismax = False; 1.43 - c->x = sx; 1.44 - c->y = sy + bh; 1.45 + c->x = wax; 1.46 + c->y = way; 1.47 if(n == 1) { /* only 1 window */ 1.48 - c->w = sw - 2 * BORDERPX; 1.49 - c->h = sh - 2 * BORDERPX - bh; 1.50 + c->w = waw - 2 * BORDERPX; 1.51 + c->h = wah - 2 * BORDERPX; 1.52 } 1.53 else if(i == 0) { /* master window */ 1.54 - c->w = mpx - 2 * BORDERPX; 1.55 - c->h = sh - bh - 2 * BORDERPX; 1.56 + c->w = waw - stackw - 2 * BORDERPX; 1.57 + c->h = wah - 2 * BORDERPX; 1.58 + th = wah / (n - 1); 1.59 } 1.60 else { /* tile window */ 1.61 c->x += mpx; 1.62 c->w = stackw - 2 * BORDERPX; 1.63 if(th > bh) { 1.64 - c->y = sy + (i - 1) * th + bh; 1.65 - if(i + 1 == n) 1.66 - c->h = sh - c->y - 2 * BORDERPX; 1.67 - else 1.68 - c->h = th - 2 * BORDERPX; 1.69 + c->y = way + (i - 1) * th; 1.70 + c->h = th - 2 * BORDERPX; 1.71 } 1.72 else /* fallback if th < bh */ 1.73 - c->h = stackh - 2 * BORDERPX; 1.74 + c->h = wah - 2 * BORDERPX; 1.75 } 1.76 resize(c, False, TopLeft); 1.77 i++;