commit 597466ce00415d6c4180331dc8d200a76e33c536
parent 801348ad690b5c4f14362225329d2df39e400be8
Author: Vladimir Seleznev <me@wladmis.org>
Date: Thu, 24 Apr 2014 14:47:01 +0400
Upgraded attachaside patch to work with dwm 6.0
Diffstat:
2 files changed, 61 insertions(+), 2 deletions(-)
diff --git a/dwm.suckless.org/patches/attachaside.md b/dwm.suckless.org/patches/attachaside.md
@@ -43,9 +43,11 @@ area instead of always becoming the new master. It's basically an
Download
--------
+* [dwm-6.0-attachaside.diff](dwm-6.0-attachaside.diff) (1,6K) (20140412)
* [dwm-5.7.2-attachaside.diff](dwm-5.7.2-attachaside.diff) (1.1K) (20091215)
* [dwm-5.6.1-attachaside.diff](dwm-5.6.1-attachaside.diff) (1.1K) (20090915)
-Author
-------
+Authors
+-------
* Jerome Andrieux - `<jerome at gcu dot info>`
+* Update to 6.0 by Vladimir Seleznev - `<me at wladmis dot org>`
diff --git a/dwm.suckless.org/patches/dwm-6.0-attachaside.diff b/dwm.suckless.org/patches/dwm-6.0-attachaside.diff
@@ -0,0 +1,57 @@
+diff --git a/dwm.c b/dwm.c
+index 1bbb4b3..b2aa1c8 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -146,6 +146,7 @@ static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool inter
+ static void arrange(Monitor *m);
+ static void arrangemon(Monitor *m);
+ static void attach(Client *c);
++static void attachaside(Client *c);
+ static void attachstack(Client *c);
+ static void buttonpress(XEvent *e);
+ static void checkotherwm(void);
+@@ -401,6 +402,17 @@ attach(Client *c) {
+ }
+
+ void
++attachaside(Client *c) {
++ Client *at = nexttiled(c->mon->clients);
++ if(c->mon->sel == NULL || c->mon->sel->isfloating || !at) {
++ attach(c);
++ return;
++ }
++ c->next = at->next;
++ at->next = c;
++}
++
++void
+ attachstack(Client *c) {
+ c->snext = c->mon->stack;
+ c->mon->stack = c;
+@@ -1051,7 +1063,7 @@ manage(Window w, XWindowAttributes *wa) {
+ c->isfloating = c->oldstate = trans != None || c->isfixed;
+ if(c->isfloating)
+ XRaiseWindow(dpy, c->win);
+- attach(c);
++ attachaside(c);
+ attachstack(c);
+ XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
+ (unsigned char *) &(c->win), 1);
+@@ -1383,7 +1395,7 @@ sendmon(Client *c, Monitor *m) {
+ detachstack(c);
+ c->mon = m;
+ c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
+- attach(c);
++ attachaside(c);
+ attachstack(c);
+ focus(NULL);
+ arrange(NULL);
+@@ -1818,7 +1830,7 @@ updategeom(void) {
+ m->clients = c->next;
+ detachstack(c);
+ c->mon = mons;
+- attach(c);
++ attachaside(c);
+ attachstack(c);
+ }
+ if(m == selmon)