sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit e79171bfbdeed92d05ca1ba67298ea213e0aeff2
parent 6e984b611a99ce196c95b523acaac8fe6dc1e492
Author: Moritz Wilhelmy <moritz plus suckless at wzff dot de>
Date:   Tue,  2 Nov 2010 22:27:45 +0100

this version of movestack actually works...
Diffstat:
Mdwm.suckless.org/patches/movestack-5.8.2.diff | 41+++++++++++++++++++----------------------
1 file changed, 19 insertions(+), 22 deletions(-)

diff --git a/dwm.suckless.org/patches/movestack-5.8.2.diff b/dwm.suckless.org/patches/movestack-5.8.2.diff @@ -21,24 +21,21 @@ diff -r 050d521d66d8 config.def.h diff -r 050d521d66d8 movestack.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/movestack.c Sun Sep 05 18:43:07 2010 +0200 -@@ -0,0 +1,52 @@ +@@ -0,0 +1,49 @@ +void +movestack(const Arg *arg) { + Client *c = NULL, *p = NULL, *pc = NULL, *i; -+ Client *sel, *clients; -+ sel = selmon->sel; -+ clients = selmon->clients; + + if(arg->i > 0) { -+ /* find the client after sel */ -+ for(c = sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); ++ /* find the client after selmon->sel */ ++ for(c = selmon->sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); + if(!c) -+ for(c = clients; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); ++ for(c = selmon->clients; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); + + } + else { -+ /* find the client before sel */ -+ for(i = clients; i != sel; i = i->next) ++ /* find the client before selmon->sel */ ++ for(i = selmon->clients; i != selmon->sel; i = i->next) + if(ISVISIBLE(i) && !i->isfloating) + c = i; + if(!c) @@ -46,29 +43,29 @@ diff -r 050d521d66d8 movestack.c + if(ISVISIBLE(i) && !i->isfloating) + c = i; + } -+ /* find the client before sel and c */ -+ for(i = clients; i && (!p || !pc); i = i->next) { -+ if(i->next == sel) ++ /* find the client before selmon->sel and c */ ++ for(i = selmon->clients; i && (!p || !pc); i = i->next) { ++ if(i->next == selmon->sel) + p = i; + if(i->next == c) + pc = i; + } + -+ /* swap c and sel clients in the clients list */ -+ if(c && c != sel) { -+ Client *temp = sel->next==c?sel:sel->next; -+ sel->next = c->next==sel?c:c->next; ++ /* swap c and selmon->sel selmon->clients in the selmon->clients list */ ++ if(c && c != selmon->sel) { ++ Client *temp = selmon->sel->next==c?selmon->sel:selmon->sel->next; ++ selmon->sel->next = c->next==selmon->sel?c:c->next; + c->next = temp; + + if(p && p != c) + p->next = c; -+ if(pc && pc != sel) -+ pc->next = sel; ++ if(pc && pc != selmon->sel) ++ pc->next = selmon->sel; + -+ if(sel == clients) -+ clients = c; -+ else if(c == clients) -+ clients = sel; ++ if(selmon->sel == selmon->clients) ++ selmon->clients = c; ++ else if(c == selmon->clients) ++ selmon->clients = selmon->sel; + + arrange(selmon); + }