diff -r 523ba822927f -r 7af79b380a77 dwm.c --- a/dwm.c Mon May 26 09:45:34 2008 +0100 +++ b/dwm.c Mon May 26 09:54:34 2008 +0100 @@ -105,7 +105,6 @@ typedef struct { const char *symbol; void (*arrange)(void); - void (*updategeom)(void); } Layout; typedef struct { @@ -183,7 +182,6 @@ void updatebar(void); void updategeom(void); void updatesizehints(Client *c); -void updatetilegeom(void); void updatetitle(Client *c); void updatewmhints(Client *c); void view(const void *arg); @@ -197,7 +195,6 @@ char stext[256]; int screen, sx, sy, sw, sh; int bx, by, bw, bh, blw, wx, wy, ww, wh; -int mx, my, mw, mh, tx, ty, tw, th; uint seltags = 0; int (*xerrorxlib)(Display *, XErrorEvent *); uint numlockmask = 0; @@ -1315,7 +1312,6 @@ if(d < 0.1 || d > 0.9) return; mfact = d; - updatetilegeom(); arrange(); } @@ -1439,7 +1435,7 @@ void tile(void) { - int x, y, h, w; + int x, y, h, w, mx, my, mw, mh, tx, ty, tw, th; uint i, n; Client *c; @@ -1447,6 +1443,18 @@ if(n == 0) return; + /* master area geometry */ + mx = wx; + my = wy; + mw = mfact * ww; + mh = wh; + + /* tile area geometry */ + tx = mx + mw; + ty = wy; + tw = ww - mw; + th = wh; + /* master */ c = nexttiled(clients); @@ -1613,11 +1621,6 @@ bx = wx; by = showbar ? (topbar ? wy - bh : wy + wh) : -bh; bw = ww; - - /* update layout geometries */ - for(i = 0; i < LENGTH(layouts); i++) - if(layouts[i].updategeom) - layouts[i].updategeom(); } void @@ -1673,21 +1676,6 @@ } void -updatetilegeom(void) { - /* master area geometry */ - mx = wx; - my = wy; - mw = mfact * ww; - mh = wh; - - /* tile area geometry */ - tx = mx + mw; - ty = wy; - tw = ww - mw; - th = wh; -} - -void updatetitle(Client *c) { if(!gettextprop(c->win, netatom[NetWMName], c->name, sizeof c->name)) gettextprop(c->win, wmatom[WMName], c->name, sizeof c->name);