diff options
| author | Thomas Ulmer <thomasmulmer02@gmail.com> | 2026-03-01 11:37:31 -0800 |
|---|---|---|
| committer | Thomas Ulmer <thomasmulmer02@gmail.com> | 2026-03-01 11:37:31 -0800 |
| commit | e01b84a6698f5060fd7dea789fc0ffa872f26b15 (patch) | |
| tree | da1d4369048833f0496ae51d400d118f30c499bd /tree/src/dwm/dwm-6.6/movestack.c | |
| parent | 6d8430971dada74478a0cd2c9eca2272a105b744 (diff) | |
remove tree
Diffstat (limited to 'tree/src/dwm/dwm-6.6/movestack.c')
| -rw-r--r-- | tree/src/dwm/dwm-6.6/movestack.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/tree/src/dwm/dwm-6.6/movestack.c b/tree/src/dwm/dwm-6.6/movestack.c deleted file mode 100644 index 0239b20..0000000 --- a/tree/src/dwm/dwm-6.6/movestack.c +++ /dev/null @@ -1,48 +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, selmon) || c->isfloating); c = c->next); - if(!c) - for(c = selmon->cl->clients; c && (!ISVISIBLE(c, selmon) || c->isfloating); c = c->next); - - } - else { - /* find the client before selmon->sel */ - for(i = selmon->cl->clients; i != selmon->sel; i = i->next) - if(ISVISIBLE(i,selmon) && !i->isfloating) - c = i; - if(!c) - for(; i; i = i->next) - if(ISVISIBLE(i,selmon) && !i->isfloating) - c = i; - } - /* find the client before selmon->sel and c */ - for(i = selmon->cl->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->cl->clients) - selmon->cl->clients = c; - else if(c == selmon->cl->clients) - selmon->cl->clients = selmon->sel; - - arrange(selmon); - } -} |
