sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 272b4fb243207b30f492353654456fa7dc25c499
parent 4cb5cfe9824f7a401c638570269209423f2e8377
Author: Alvar Penning <post@0x21.biz>
Date:   Sun,  8 Mar 2020 14:39:26 +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.

Diffstat:
Adwm.suckless.org/patches/push/dwm-6.2-push_no_master.diff | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdwm.suckless.org/patches/push/index.md | 1+
2 files changed, 71 insertions(+), 0 deletions(-)

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 @@ -0,0 +1,70 @@ +diff --git a/dwm.c b/dwm.c +index 4465af1..49e63f0 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -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); +@@ -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) + { +@@ -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 @@ -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 ----