commit 5f4f83b5dcc19cf6914c9f3b3039c97662d62142
parent b6a1ea0214ef17ce18d4fbd7c213ed93d381803f
Author: Dave Kennedy <dave-kennedy@users.noreply.github.com>
Date: Sun, 22 Nov 2015 11:33:05 -0700
Updated to work with latest version of dwm
Diffstat:
2 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/dwm.suckless.org/patches/attachabove.md b/dwm.suckless.org/patches/attachabove.md
@@ -11,7 +11,7 @@ Download
Patches against different versions of dwm are available at
[dwm-clean-patches](https://github.com/jceb/dwm-clean-patches).
- * [dwm-6.1-attachabove.diff](dwm-6.1-attachabove.diff) (1786b) (20140209)
+ * [dwm-6.1-attachabove.diff](dwm-6.1-attachabove.diff) (1829b) (20151122)
* [dwm-git-20120406-attachabove.diff](dwm-git-20120406-attachabove.diff) (1709b)
* [dwm-6.0-attachabove.diff](dwm-6.0-attachabove.diff) (1707b) (20120406)
* [dwm-5.6.1-attachabove.diff](historical/dwm-5.6.1-attachabove.diff) (1.1K) (20090817)
diff --git a/dwm.suckless.org/patches/dwm-6.1-attachabove.diff b/dwm.suckless.org/patches/dwm-6.1-attachabove.diff
@@ -1,13 +1,11 @@
Author: Jan Christoph Ebersbach <jceb@e-jc.de>
URL: http://dwm.suckless.org/patches/attachabove
attachabove makes new clients attach above the selected client (instead of
-always becoming the new master) – basically how Xmonad does it.
+always becoming the new master) - basically how Xmonad does it.
-Index: dwm/dwm.c
-===================================================================
---- dwm/dwm.c.orig 2014-02-09 15:24:20.560117200 +0100
-+++ dwm/dwm.c 2014-02-09 15:24:20.552117200 +0100
-@@ -146,6 +146,7 @@
+--- dwm/dwm.c.orig 2015-11-22 10:48:28.288368772 -0700
++++ dwm/dwm.c 2015-11-22 10:51:45.308360761 -0700
+@@ -147,6 +147,7 @@ static int applysizehints(Client *c, int
static void arrange(Monitor *m);
static void arrangemon(Monitor *m);
static void attach(Client *c);
@@ -15,11 +13,12 @@ Index: dwm/dwm.c
static void attachstack(Client *c);
static void buttonpress(XEvent *e);
static void checkotherwm(void);
-@@ -401,6 +402,19 @@
+@@ -406,6 +407,20 @@ attach(Client *c)
}
void
-+attachabove(Client *c) {
++attachabove(Client *c)
++{
+ if(c->mon->sel == NULL || c->mon->sel == c->mon->clients || c->mon->sel->isfloating) {
+ attach(c);
+ return;
@@ -32,19 +31,19 @@ Index: dwm/dwm.c
+}
+
+void
- attachstack(Client *c) {
+ attachstack(Client *c)
+ {
c->snext = c->mon->stack;
- c->mon->stack = c;
-@@ -1051,7 +1065,7 @@
+@@ -1076,7 +1091,7 @@ manage(Window w, XWindowAttributes *wa)
c->isfloating = c->oldstate = trans != None || c->isfixed;
- if(c->isfloating)
+ if (c->isfloating)
XRaiseWindow(dpy, c->win);
- attach(c);
+ attachabove(c);
attachstack(c);
XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
(unsigned char *) &(c->win), 1);
-@@ -1383,7 +1397,7 @@
+@@ -1434,7 +1449,7 @@ sendmon(Client *c, Monitor *m)
detachstack(c);
c->mon = m;
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
@@ -53,7 +52,7 @@ Index: dwm/dwm.c
attachstack(c);
focus(NULL);
arrange(NULL);
-@@ -1818,7 +1832,7 @@
+@@ -1891,7 +1906,7 @@ updategeom(void)
m->clients = c->next;
detachstack(c);
c->mon = mons;
@@ -61,4 +60,4 @@ Index: dwm/dwm.c
+ attachabove(c);
attachstack(c);
}
- if(m == selmon)
+ if (m == selmon)