diff --git a/dwm.c b/dwm.c index 1d78655..6c61aab 100644 --- a/dwm.c +++ b/dwm.c @@ -90,7 +90,7 @@ struct Client { int basew, baseh, incw, inch, maxw, maxh, minw, minh; int bw, oldbw; unsigned int tags; - Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; + Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize; Client *next; Client *snext; Monitor *mon; @@ -626,6 +626,8 @@ configurerequest(XEvent *e) { configure(c); if(ISVISIBLE(c)) XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); + else + c->needresize=1; } else configure(c); @@ -1644,6 +1646,12 @@ showhide(Client *c) { return; if(ISVISIBLE(c)) { /* show clients top down */ XMoveWindow(dpy, c->win, c->x, c->y); + if(c->needresize) { + c->needresize=0; + XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); + } else { + XMoveWindow(dpy, c->win, c->x, c->y); + } if((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen) resize(c, c->x, c->y, c->w, c->h, False); showhide(c->snext);