[wiki] [sites] dwm autoresize patch: fix patches nad markdown || FRIGN

From: <git_AT_suckless.org>
Date: Mon, 18 Jul 2016 07:27:48 +0200

commit c881f510a20f5b7cc2fbbac7a8bf2e3b12fe16f1
Author: FRIGN <dev_AT_frign.de>
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
_AT_@ -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 - <0mark_AT_unserver.de>
+ * Laslo Hunhold - <dev_AT_frign.de> (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
_AT_@ -0,0 +1,35 @@
+diff --git a/dwm.c b/dwm.c
+index b2bc9bd..3002925 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -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;
+_AT_@ -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 {
+_AT_@ -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
_AT_@ -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
-_AT_@ -91,7 +91,7 @@ struct Client {
+_AT_@ -90,7 +90,7 @@ struct Client {
          int basew, baseh, incw, inch, maxw, maxh, minw, minh;
          int bw, oldbw;
          unsigned int tags;
_AT_@ -11,7 +11,7 @@ index e3bf6f4..8a2c646 100644
          Client *next;
          Client *snext;
          Monitor *mon;
-_AT_@ -633,6 +633,8 @@ configurerequest(XEvent *e) {
+_AT_@ -626,6 +626,8 @@ configurerequest(XEvent *e) {
                                  configure(c);
                          if(ISVISIBLE(c))
                                  XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
_AT_@ -20,7 +20,7 @@ index e3bf6f4..8a2c646 100644
                  }
                  else
                          configure(c);
-_AT_@ -1663,6 +1665,12 @@ showhide(Client *c) {
+_AT_@ -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
_AT_@ -0,0 +1,35 @@
+diff --git a/dwm.c b/dwm.c
+index 0362114..e4e8514 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -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;
+_AT_@ -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 {
+_AT_@ -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);
Received on Mon Jul 18 2016 - 07:27:48 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 18 2016 - 07:36:13 CEST