autoresize.diff (990B)
1 diff -r 53d98940cb04 dwm.c 2 --- a/dwm.c Fri Jun 04 11:41:16 2010 +0100 3 +++ b/dwm.c Sat Jul 03 10:31:22 2010 +0200 4 @@ -88,7 +88,7 @@ 5 int basew, baseh, incw, inch, maxw, maxh, minw, minh; 6 int bw, oldbw; 7 unsigned int tags; 8 - Bool isfixed, isfloating, isurgent, oldstate; 9 + Bool isfixed, isfloating, isurgent, oldstate, needresize; 10 Client *next; 11 Client *snext; 12 Monitor *mon; 13 @@ -591,6 +591,8 @@ 14 configure(c); 15 if(ISVISIBLE(c)) 16 XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); 17 + else 18 + c->needresize=1; 19 } 20 else 21 configure(c); 22 @@ -1576,7 +1578,12 @@ 23 if(!c) 24 return; 25 if(ISVISIBLE(c)) { /* show clients top down */ 26 - XMoveWindow(dpy, c->win, c->x, c->y); 27 + if(c->needresize) { 28 + c->needresize=0; 29 + XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); 30 + } else { 31 + XMoveWindow(dpy, c->win, c->x, c->y); 32 + } 33 if(!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) 34 resize(c, c->x, c->y, c->w, c->h, False); 35 showhide(c->snext);