=== modified file 'dwm.c' --- dwm.c 2007-11-27 23:42:20 +0000 +++ dwm.c 2007-12-13 12:19:07 +0000 @@ -218,6 +218,7 @@ }; Atom wmatom[WMLast], netatom[NetLast]; Bool domwfact = True; +Bool dorestack = True; Bool dozoom = True; Bool otherwm, readin; Bool running = True; @@ -280,7 +281,7 @@ ban(c); layout->arrange(); focus(NULL); - restack(); + if(dorestack) restack(); } void @@ -340,7 +341,7 @@ return; if(ev->button == Button1) { if((layout->arrange == floating) || c->isfloating) - restack(); + if(dorestack) restack(); else togglefloating(NULL); movemouse(c); @@ -353,7 +354,7 @@ } else if(ev->button == Button3 && !c->isfixed) { if((floating == layout->arrange) || c->isfloating) - restack(); + if(dorestack) restack(); else togglefloating(NULL); resizemouse(c); @@ -681,6 +682,7 @@ Client *c; domwfact = dozoom = False; + dorestack = True; for(c = clients; c; c = c->next) if(isvisible(c)) resize(c, c->x, c->y, c->w, c->h, True); @@ -730,7 +732,7 @@ for(c = clients; c && !isvisible(c); c = c->next); if(c) { focus(c); - restack(); + if(dorestack) restack(); } } @@ -747,7 +749,7 @@ } if(c) { focus(c); - restack(); + if(dorestack) restack(); } } @@ -1584,6 +1586,7 @@ Client *c, *mc; domwfact = dozoom = True; + dorestack = True; for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) n++;