URI: 
       dwm-autoresize-6.0.diff - sites - public wiki contents of suckless.org
  HTML git clone git://git.suckless.org/sites
   DIR Log
   DIR Files
   DIR Refs
       ---
       dwm-autoresize-6.0.diff (1196B)
       ---
            1 diff --git a/dwm.c b/dwm.c
            2 index 1d78655..6c61aab 100644
            3 --- a/dwm.c
            4 +++ b/dwm.c
            5 @@ -90,7 +90,7 @@ struct Client {
            6          int basew, baseh, incw, inch, maxw, maxh, minw, minh;
            7          int bw, oldbw;
            8          unsigned int tags;
            9 -        Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
           10 +        Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize;
           11          Client *next;
           12          Client *snext;
           13          Monitor *mon;
           14 @@ -626,6 +626,8 @@ configurerequest(XEvent *e) {
           15                                  configure(c);
           16                          if(ISVISIBLE(c))
           17                                  XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
           18 +                        else
           19 +                                c->needresize=1;
           20                  }
           21                  else
           22                          configure(c);
           23 @@ -1644,6 +1646,12 @@ showhide(Client *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) && !c->isfullscreen)
           34                          resize(c, c->x, c->y, c->w, c->h, False);
           35                  showhide(c->snext);