swallow: correcting indentation (spaces to tabs)

pull/26/head
bakkeby 3 years ago
parent 7638fba1b5
commit cabb937eef

@ -1,4 +1,4 @@
From 7aadf5ee20549704107f7c6c04b683b2ef0db08d Mon Sep 17 00:00:00 2001
From 7d27280b0620cb9217da816037279d9a02ab36f8 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com>
Date: Fri, 29 Jan 2021 19:29:59 +0100
Subject: [PATCH] Alternative swallow patch that replaces clients instead of
@ -7,8 +7,8 @@ Subject: [PATCH] Alternative swallow patch that replaces clients instead of
---
config.def.h | 9 +-
config.mk | 6 +-
dwm.c | 300 +++++++++++++++++++++++++++++++++++++++++++++++----
3 files changed, 288 insertions(+), 27 deletions(-)
dwm.c | 297 +++++++++++++++++++++++++++++++++++++++++++++++----
3 files changed, 285 insertions(+), 27 deletions(-)
diff --git a/config.def.h b/config.def.h
index 1c0b587..392ae32 100644
@ -58,7 +58,7 @@ index 6d36cb7..e65c09a 100644
# flags
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
diff --git a/dwm.c b/dwm.c
index 4465af1..9e1519d 100644
index 4465af1..c03f0a3 100644
--- a/dwm.c
+++ b/dwm.c
@@ -40,6 +40,12 @@
@ -350,14 +350,13 @@ index 4465af1..9e1519d 100644
detach(c);
detachstack(c);
if (!destroyed) {
@@ -2044,6 +2166,136 @@ view(const Arg *arg)
@@ -2044,6 +2166,133 @@ view(const Arg *arg)
arrange(selmon);
}
+pid_t
+winpid(Window w)
+{
+
+ pid_t result = 0;
+
+#ifdef __linux__
@ -386,24 +385,22 @@ index 4465af1..9e1519d 100644
+
+ if (result == (pid_t)-1)
+ result = 0;
+
+#endif /* __linux__ */
+
+#ifdef __OpenBSD__
+ Atom type;
+ int format;
+ unsigned long len, bytes;
+ unsigned char *prop;
+ pid_t ret;
+ Atom type;
+ int format;
+ unsigned long len, bytes;
+ unsigned char *prop;
+ pid_t ret;
+
+ if (XGetWindowProperty(dpy, w, XInternAtom(dpy, "_NET_WM_PID", 0), 0, 1, False, AnyPropertyType, &type, &format, &len, &bytes, &prop) != Success || !prop)
+ return 0;
+
+ ret = *(pid_t*)prop;
+ XFree(prop);
+ result = ret;
+ if (XGetWindowProperty(dpy, w, XInternAtom(dpy, "_NET_WM_PID", 0), 0, 1, False, AnyPropertyType, &type, &format, &len, &bytes, &prop) != Success || !prop)
+ return 0;
+
+ ret = *(pid_t*)prop;
+ XFree(prop);
+ result = ret;
+#endif /* __OpenBSD__ */
+
+ return result;
+}
+
@ -487,7 +484,7 @@ index 4465af1..9e1519d 100644
Client *
wintoclient(Window w)
{
@@ -2135,10 +2387,12 @@ main(int argc, char *argv[])
@@ -2135,10 +2384,12 @@ main(int argc, char *argv[])
fputs("warning: no locale support\n", stderr);
if (!(dpy = XOpenDisplay(NULL)))
die("dwm: cannot open display");

@ -1,7 +1,7 @@
From a47e67043d789d778b35d0d3cc834c216d37e5bd Mon Sep 17 00:00:00 2001
From 95efbff305e7454b5f099fa3beb991ef82228e8e Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com>
Date: Sun, 14 Feb 2021 13:06:41 +0100
Subject: [PATCH 2/2] riodraw on top of swallow
Date: Sun, 14 Feb 2021 14:16:33 +0100
Subject: [PATCH 2/2] Adding riodraw on top of swallow
---
config.def.h | 5 +++
@ -32,7 +32,7 @@ index 392ae32..01e2901 100644
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
diff --git a/dwm.c b/dwm.c
index 9e1519d..3300186 100644
index c03f0a3..716eed7 100644
--- a/dwm.c
+++ b/dwm.c
@@ -204,6 +204,10 @@ static void resize(Client *c, int x, int y, int w, int h, int interact);

@ -1,4 +1,4 @@
From 7aadf5ee20549704107f7c6c04b683b2ef0db08d Mon Sep 17 00:00:00 2001
From 7d27280b0620cb9217da816037279d9a02ab36f8 Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com>
Date: Fri, 29 Jan 2021 19:29:59 +0100
Subject: [PATCH 1/2] Alternative swallow patch that replaces clients instead
@ -7,8 +7,8 @@ Subject: [PATCH 1/2] Alternative swallow patch that replaces clients instead
---
config.def.h | 9 +-
config.mk | 6 +-
dwm.c | 300 +++++++++++++++++++++++++++++++++++++++++++++++----
3 files changed, 288 insertions(+), 27 deletions(-)
dwm.c | 297 +++++++++++++++++++++++++++++++++++++++++++++++----
3 files changed, 285 insertions(+), 27 deletions(-)
diff --git a/config.def.h b/config.def.h
index 1c0b587..392ae32 100644
@ -58,7 +58,7 @@ index 6d36cb7..e65c09a 100644
# flags
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
diff --git a/dwm.c b/dwm.c
index 4465af1..9e1519d 100644
index 4465af1..c03f0a3 100644
--- a/dwm.c
+++ b/dwm.c
@@ -40,6 +40,12 @@
@ -350,14 +350,13 @@ index 4465af1..9e1519d 100644
detach(c);
detachstack(c);
if (!destroyed) {
@@ -2044,6 +2166,136 @@ view(const Arg *arg)
@@ -2044,6 +2166,133 @@ view(const Arg *arg)
arrange(selmon);
}
+pid_t
+winpid(Window w)
+{
+
+ pid_t result = 0;
+
+#ifdef __linux__
@ -386,24 +385,22 @@ index 4465af1..9e1519d 100644
+
+ if (result == (pid_t)-1)
+ result = 0;
+
+#endif /* __linux__ */
+
+#ifdef __OpenBSD__
+ Atom type;
+ int format;
+ unsigned long len, bytes;
+ unsigned char *prop;
+ pid_t ret;
+ Atom type;
+ int format;
+ unsigned long len, bytes;
+ unsigned char *prop;
+ pid_t ret;
+
+ if (XGetWindowProperty(dpy, w, XInternAtom(dpy, "_NET_WM_PID", 0), 0, 1, False, AnyPropertyType, &type, &format, &len, &bytes, &prop) != Success || !prop)
+ return 0;
+
+ ret = *(pid_t*)prop;
+ XFree(prop);
+ result = ret;
+ if (XGetWindowProperty(dpy, w, XInternAtom(dpy, "_NET_WM_PID", 0), 0, 1, False, AnyPropertyType, &type, &format, &len, &bytes, &prop) != Success || !prop)
+ return 0;
+
+ ret = *(pid_t*)prop;
+ XFree(prop);
+ result = ret;
+#endif /* __OpenBSD__ */
+
+ return result;
+}
+
@ -487,7 +484,7 @@ index 4465af1..9e1519d 100644
Client *
wintoclient(Window w)
{
@@ -2135,10 +2387,12 @@ main(int argc, char *argv[])
@@ -2135,10 +2384,12 @@ main(int argc, char *argv[])
fputs("warning: no locale support\n", stderr);
if (!(dpy = XOpenDisplay(NULL)))
die("dwm: cannot open display");
@ -505,10 +502,10 @@ index 4465af1..9e1519d 100644
2.19.1
From a47e67043d789d778b35d0d3cc834c216d37e5bd Mon Sep 17 00:00:00 2001
From 95efbff305e7454b5f099fa3beb991ef82228e8e Mon Sep 17 00:00:00 2001
From: bakkeby <bakkeby@gmail.com>
Date: Sun, 14 Feb 2021 13:06:41 +0100
Subject: [PATCH 2/2] riodraw on top of swallow
Date: Sun, 14 Feb 2021 14:16:33 +0100
Subject: [PATCH 2/2] Adding riodraw on top of swallow
---
config.def.h | 5 +++
@ -539,7 +536,7 @@ index 392ae32..01e2901 100644
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
diff --git a/dwm.c b/dwm.c
index 9e1519d..3300186 100644
index c03f0a3..716eed7 100644
--- a/dwm.c
+++ b/dwm.c
@@ -204,6 +204,10 @@ static void resize(Client *c, int x, int y, int w, int h, int interact);

Loading…
Cancel
Save