commit c881f510a20f5b7cc2fbbac7a8bf2e3b12fe16f1
Author: FRIGN <[email protected]>
Date:   Mon Jul 18 07:26:33 2016 +0200

    dwm autoresize patch: fix patches nad markdown
    
    The 6.0 patch was broken. How come one can not manage to make those
    patches apply cleanly to its fixed version?
    
    I also added a 6.1 and git patch, now everything is cool.

diff --git a/dwm.suckless.org/patches/autoresize.md 
b/dwm.suckless.org/patches/autoresize.md
index 4b5be90..1e63c7d 100644
--- a/dwm.suckless.org/patches/autoresize.md
+++ b/dwm.suckless.org/patches/autoresize.md
@@ -1,13 +1,21 @@
-# autoresize
+autoresize
+==========
 
-## Description
+Description
+-----------
 
-By default, windows that are not visible when requesting a resize/move wont 
get resized/moved. With this Patch, they do.
+By default, windows that are not visible when requesting a resize/move
+won't get resized/moved. With this patch, they will.
 
-## Download
+Download
+--------
 
- * [dwm-autoresize-6.0.diff](dwm-autoresize-6.0.diff) (15.04.2013)
+ * [dwm-autoresize-6.0.diff](dwm-autoresize-6.0.diff)
+ * [dwm-autoresize-6.1.diff](dwm-autoresize-6.1.diff)
+ * [dwm-autoresize-20160718-56a31dc.diff](dwm-autoresize-20160718-56a31dc.diff)
 
-## Author
+Authors
+-------
 
  * Stefan Mark - <[email protected]>
+ * Laslo Hunhold - <[email protected]> (6.1, git ports)
diff --git a/dwm.suckless.org/patches/dwm-autoresize-20160718-56a31dc.diff 
b/dwm.suckless.org/patches/dwm-autoresize-20160718-56a31dc.diff
new file mode 100644
index 0000000..1e96e1d
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-autoresize-20160718-56a31dc.diff
@@ -0,0 +1,35 @@
+diff --git a/dwm.c b/dwm.c
+index b2bc9bd..3002925 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -93,7 +93,7 @@ struct Client {
+       int basew, baseh, incw, inch, maxw, maxh, minw, minh;
+       int bw, oldbw;
+       unsigned int tags;
+-      int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
++      int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, 
needresize;
+       Client *next;
+       Client *snext;
+       Monitor *mon;
+@@ -625,6 +625,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);
+       } else {
+@@ -1610,6 +1612,12 @@ showhide(Client *c)
+       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, 0);
+               showhide(c->snext);
diff --git a/dwm.suckless.org/patches/dwm-autoresize-6.0.diff 
b/dwm.suckless.org/patches/dwm-autoresize-6.0.diff
index 4bb3104..02f7af4 100644
--- a/dwm.suckless.org/patches/dwm-autoresize-6.0.diff
+++ b/dwm.suckless.org/patches/dwm-autoresize-6.0.diff
@@ -1,8 +1,8 @@
 diff --git a/dwm.c b/dwm.c
-index e3bf6f4..8a2c646 100644
+index 1d78655..6c61aab 100644
 --- a/dwm.c
 +++ b/dwm.c
-@@ -91,7 +91,7 @@ struct Client {
+@@ -90,7 +90,7 @@ struct Client {
        int basew, baseh, incw, inch, maxw, maxh, minw, minh;
        int bw, oldbw;
        unsigned int tags;
@@ -11,7 +11,7 @@ index e3bf6f4..8a2c646 100644
        Client *next;
        Client *snext;
        Monitor *mon;
-@@ -633,6 +633,8 @@ configurerequest(XEvent *e) {
+@@ -626,6 +626,8 @@ configurerequest(XEvent *e) {
                                configure(c);
                        if(ISVISIBLE(c))
                                XMoveResizeWindow(dpy, c->win, c->x, c->y, 
c->w, c->h);
@@ -20,7 +20,7 @@ index e3bf6f4..8a2c646 100644
                }
                else
                        configure(c);
-@@ -1663,6 +1665,12 @@ showhide(Client *c) {
+@@ -1644,6 +1646,12 @@ showhide(Client *c) {
                return;
        if(ISVISIBLE(c)) { /* show clients top down */
                XMoveWindow(dpy, c->win, c->x, c->y);
diff --git a/dwm.suckless.org/patches/dwm-autoresize-6.1.diff 
b/dwm.suckless.org/patches/dwm-autoresize-6.1.diff
new file mode 100644
index 0000000..76530b9
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-autoresize-6.1.diff
@@ -0,0 +1,35 @@
+diff --git a/dwm.c b/dwm.c
+index 0362114..e4e8514 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -92,7 +92,7 @@ struct Client {
+       int basew, baseh, incw, inch, maxw, maxh, minw, minh;
+       int bw, oldbw;
+       unsigned int tags;
+-      int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
++      int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, 
needresize;
+       Client *next;
+       Client *snext;
+       Monitor *mon;
+@@ -621,6 +621,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);
+       } else {
+@@ -1611,6 +1613,12 @@ showhide(Client *c)
+       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, 0);
+               showhide(c->snext);


Reply via email to