[wiki] [sites] [dwm][patch][push] Add dwm-6.2-push_no_master.diff || Alvar Penning
commit 272b4fb243207b30f492353654456fa7dc25c499
Author: Alvar Penning <post_AT_0x21.biz>
Date: Sun Mar 8 14:39:26 2020 +0100
[dwm][patch][push] Add dwm-6.2-push_no_master.diff
This patch is almost identical to the 6.1 version, except that the wrong
indentation in the pushup function has been fixed. This caused compiler
warnings. The bug does not seem to be present in dwm-push-6.1.diff.
diff --git a/dwm.suckless.org/patches/push/dwm-6.2-push_no_master.diff b/dwm.suckless.org/patches/push/dwm-6.2-push_no_master.diff
new file mode 100644
index 00000000..873e4381
--- /dev/null
+++ b/dwm.suckless.org/patches/push/dwm-6.2-push_no_master.diff
_AT_@ -0,0 +1,70 @@
+diff --git a/dwm.c b/dwm.c
+index 4465af1..49e63f0 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -185,7 +185,10 @@ static void motionnotify(XEvent *e);
+ static void movemouse(const Arg *arg);
+ static Client *nexttiled(Client *c);
+ static void pop(Client *);
++static Client *prevtiled(Client *c);
+ static void propertynotify(XEvent *e);
++static void pushdown(const Arg *arg);
++static void pushup(const Arg *arg);
+ static void quit(const Arg *arg);
+ static Monitor *recttomon(int x, int y, int w, int h);
+ static void resize(Client *c, int x, int y, int w, int h, int interact);
+_AT_@ -1208,6 +1211,16 @@ pop(Client *c)
+ arrange(c->mon);
+ }
+
++Client *
++prevtiled(Client *c) {
++ Client *p, *r;
++
++ for(p = selmon->clients, r = NULL; p && p != c; p = p->next)
++ if(!p->isfloating && ISVISIBLE(p))
++ r = p;
++ return r;
++}
++
+ void
+ propertynotify(XEvent *e)
+ {
+_AT_@ -1245,6 +1258,37 @@ propertynotify(XEvent *e)
+ }
+ }
+
++void
++pushdown(const Arg *arg) {
++ Client *sel = selmon->sel, *c;
++
++ if(!sel || sel->isfloating || sel == nexttiled(selmon->clients))
++ return;
++ if((c = nexttiled(sel->next))) {
++ detach(sel);
++ sel->next = c->next;
++ c->next = sel;
++ }
++ focus(sel);
++ arrange(selmon);
++}
++
++void
++pushup(const Arg *arg) {
++ Client *sel = selmon->sel, *c;
++
++ if(!sel || sel->isfloating)
++ return;
++ if((c = prevtiled(sel)) && c != nexttiled(selmon->clients)) {
++ detach(sel);
++ sel->next = c;
++ for(c = selmon->clients; c->next != sel->next; c = c->next);
++ c->next = sel;
++ }
++ focus(sel);
++ arrange(selmon);
++}
++
+ void
+ quit(const Arg *arg)
+ {
diff --git a/dwm.suckless.org/patches/push/index.md b/dwm.suckless.org/patches/push/index.md
index ae55ab11..43c6aae4 100644
--- a/dwm.suckless.org/patches/push/index.md
+++ b/dwm.suckless.org/patches/push/index.md
_AT_@ -22,6 +22,7 @@ Download
* [dwm-6.0-push\_no\_master.diff](dwm-6.0-push_no_master.diff)
* [dwm-push-6.1.diff](dwm-push-6.1.diff) (1402b) - 2014/2/9
* [dwm-6.1-push\_no\_master.diff](dwm-6.1-push_no_master.diff) - 2015/11/21
+* [dwm-6.2-push\_no\_master.diff](dwm-6.2-push_no_master.diff) - 2020/03/08
Note
----
Received on Sun Mar 08 2020 - 14:45:11 CET
This archive was generated by hypermail 2.3.0
: Sun Mar 08 2020 - 14:48:46 CET