From 8085a92b7b8ac14424913777fd4355fa153a94a3 Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Fri, 13 Feb 2026 09:34:04 -0800 Subject: dwm redisable focus follows mouse --- tree/src/dwm/my-dwm/movestack.c | 49 ----------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 tree/src/dwm/my-dwm/movestack.c (limited to 'tree/src/dwm/my-dwm/movestack.c') diff --git a/tree/src/dwm/my-dwm/movestack.c b/tree/src/dwm/my-dwm/movestack.c deleted file mode 100644 index c040462..0000000 --- a/tree/src/dwm/my-dwm/movestack.c +++ /dev/null @@ -1,49 +0,0 @@ -void -movestack(const Arg *arg) { - Client *c = NULL, *p = NULL, *pc = NULL, *i; - - if(arg->i > 0) { - /* find the client after selmon->sel */ - for(c = selmon->sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); - if(!c) - for(c = selmon->clients; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); - - } - else { - /* 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) - for(; i; i = i->next) - if(ISVISIBLE(i) && !i->isfloating) - c = i; - } - /* 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 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 != selmon->sel) - pc->next = selmon->sel; - - if(selmon->sel == selmon->clients) - selmon->clients = c; - else if(c == selmon->clients) - selmon->clients = selmon->sel; - - arrange(selmon); - } -} - -- cgit v1.2.3