commit 412e6ea94bef41a731ce33a846d407d98e05121a
Author: Britton Leo Kerin <[email protected]>
Date: Fri Jul 15 14:44:00 2016 -0800
Fixed patch to apply correctly to 6.1
diff --git a/dwm.suckless.org/patches/dwm-dwmfifo-6.1.diff
b/dwm.suckless.org/patches/dwm-dwmfifo-6.1.diff
index 7bad802..74c3e1c 100644
--- a/dwm.suckless.org/patches/dwm-dwmfifo-6.1.diff
+++ b/dwm.suckless.org/patches/dwm-dwmfifo-6.1.diff
@@ -1,8 +1,8 @@
diff --git a/config.def.h b/config.def.h
-index 875885b..c0a01fa 100644
+index 7054c06..9f4ef79 100644
--- a/config.def.h
+++ b/config.def.h
-@@ -108,3 +108,65 @@ static Button buttons[] = {
+@@ -111,3 +111,65 @@ static Button buttons[] = {
{ ClkTagBar, MODKEY, Button3, toggletag,
{0} },
};
@@ -69,7 +69,7 @@ index 875885b..c0a01fa 100644
+ { "toggletag9", toggletag, {.ui = 1 << 8} },
+};
diff --git a/dwm.c b/dwm.c
-index 1bbb4b3..cd7ddd1 100644
+index 0362114..194c3e9 100644
--- a/dwm.c
+++ b/dwm.c
@@ -21,6 +21,7 @@
@@ -78,8 +78,8 @@ index 1bbb4b3..cd7ddd1 100644
#include <errno.h>
+#include <fcntl.h>
#include <locale.h>
- #include <stdarg.h>
#include <signal.h>
+ #include <stdarg.h>
@@ -28,6 +29,8 @@
#include <stdlib.h>
#include <string.h>
@@ -89,7 +89,7 @@ index 1bbb4b3..cd7ddd1 100644
#include <sys/types.h>
#include <sys/wait.h>
#include <X11/cursorfont.h>
-@@ -140,6 +143,12 @@ typedef struct {
+@@ -141,6 +144,12 @@ typedef struct {
int monitor;
} Rule;
@@ -101,8 +101,8 @@ index 1bbb4b3..cd7ddd1 100644
+
/* function declarations */
static void applyrules(Client *c);
- static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool
interact);
-@@ -161,9 +170,11 @@ static void destroynotify(XEvent *e);
+ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int
interact);
+@@ -162,9 +171,11 @@ static void destroynotify(XEvent *e);
static void detach(Client *c);
static void detachstack(Client *c);
static Monitor *dirtomon(int dir);
@@ -114,15 +114,15 @@ index 1bbb4b3..cd7ddd1 100644
static void expose(XEvent *e);
static void focus(Client *c);
static void focusin(XEvent *e);
-@@ -266,6 +277,7 @@ static Drw *drw;
- static Fnt *fnt;
+@@ -266,6 +277,7 @@ static Display *dpy;
+ static Drw *drw;
static Monitor *mons, *selmon;
static Window root;
+static int fifofd;
/* configuration, allows nested code to access above variables */
#include "config.h"
-@@ -485,6 +497,7 @@ cleanup(void) {
+@@ -490,6 +502,7 @@ cleanup(void)
XSync(dpy, False);
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
@@ -130,33 +130,33 @@ index 1bbb4b3..cd7ddd1 100644
}
void
-@@ -691,6 +704,25 @@ dirtomon(int dir) {
+@@ -702,6 +715,25 @@ dirtomon(int dir)
}
void
+dispatchcmd(void)
+{
-+ int i;
-+ char buf[BUFSIZ];
-+ ssize_t n;
++ int i;
++ char buf[BUFSIZ];
++ ssize_t n;
+
-+ n = read(fifofd, buf, sizeof(buf) - 1);
-+ if (n == -1)
-+ die("Failed to read from DWM fifo
");
-+ buf[n] = '