X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=tile.c;h=82696769e02a403fc6af59e7efe0a20e939260a3;hp=46cb500556f97291aee6b5926c838d184e80e596;hb=6bdef73a4f0c2a96f8984ddc10b55f1d753ab5fe;hpb=549726869bd88f70727ecae8a28161700395b20b diff --git a/tile.c b/tile.c index 46cb500..8269676 100644 --- a/tile.c +++ b/tile.c @@ -20,13 +20,13 @@ setmfact(const char *arg) { return; mfact = d; } - updategeom(); + updatetilegeom(); arrange(); } void tile(void) { - int y, h; + int x, y, h, w; unsigned int i, n; Client *c; @@ -46,16 +46,18 @@ tile(void) { return; /* tile stack */ + x = (tx > c->x + c->w) ? c->x + c->w + 2 * c->bw : tw; y = ty; + w = (tx > c->x + c->w) ? wx + ww - x : tw; h = th / n; if(h < bh) h = th; for(i = 0, c = nextunfloating(c->next); c; c = nextunfloating(c->next), i++) { if(i + 1 == n) /* remainder */ - tileresize(c, tx, y, tw - 2 * c->bw, (ty + th) - y - 2 * c->bw); + tileresize(c, x, y, w - 2 * c->bw, (ty + th) - y - 2 * c->bw); else - tileresize(c, tx, y, tw - 2 * c->bw, h - 2 * c->bw); + tileresize(c, x, y, w - 2 * c->bw, h - 2 * c->bw); if(h != th) y = c->y + c->h + 2 * c->bw; } @@ -86,9 +88,6 @@ zoom(const char *arg) { void updatetilegeom(void) { -#ifdef TILEGEOM /* define your own if you are Xinerama user */ - TILEGEOM -#else /* master area geometry */ mx = wx; my = wy; @@ -100,5 +99,4 @@ updatetilegeom(void) { ty = wy; tw = ww - mw; th = wh; -#endif }