[wiki] [sites] wiki updated
changeset: 637:37720dfb2322
tag: tip
user: Moritz Wilhelmy <moritz plus suckless at wzff dot de>
date: Tue Nov 02 22:27:45 2010 +0100
files: dwm.suckless.org/patches/movestack-5.8.2.diff
description:
this version of movestack actually works...
diff -r 4d577e2bfd04 -r 37720dfb2322 dwm.suckless.org/patches/movestack-5.8.2.diff
--- a/dwm.suckless.org/patches/movestack-5.8.2.diff Sat Oct 30 11:00:34 2010 -0700
+++ b/dwm.suckless.org/patches/movestack-5.8.2.diff Tue Nov 02 22:27:45 2010 +0100
_AT_@ -21,24 +21,21 @@
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
-_AT_@ -0,0 +1,52 @@
+_AT_@ -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)
_AT_@ -46,29 +43,29 @@
+ 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);
+ }
Received on Tue Nov 02 2010 - 22:25:40 CET
This archive was generated by hypermail 2.3.0
: Thu Sep 13 2012 - 19:31:30 CEST