diff options
| author | bakkeby <[email protected]> | 2020-02-02 11:55:19 +0100 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-02-02 11:55:19 +0100 |
| commit | 6de03c1735b272a8081ffc8a25e078ec7e37f2c1 (patch) | |
| tree | 7951a7c3bdc54418469c9986914c4dc677705818 /patch/transferall.c | |
| parent | 4ddfdab30ef77637b1a112dc181606c1260f84af (diff) | |
| download | dwm-flexipatch-6de03c1735b272a8081ffc8a25e078ec7e37f2c1.tar.gz dwm-flexipatch-6de03c1735b272a8081ffc8a25e078ec7e37f2c1.zip | |
Adding transferall patch
Diffstat (limited to 'patch/transferall.c')
| -rw-r--r-- | patch/transferall.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/patch/transferall.c b/patch/transferall.c new file mode 100644 index 0000000..fe12699 --- /dev/null +++ b/patch/transferall.c @@ -0,0 +1,25 @@ +void +transferall(const Arg *arg) +{ + Client *c, *n = selmon->clients, *attachfrom = NULL; + int i = 0, nstackclients = 0; + while (n) { + c = n; + n = c->next; + if (!ISVISIBLE(c) || c->isfloating) continue; + if (i >= selmon->nmaster) { + detach(c); + if (!attachfrom) { + attach(c); + } else { + c->next = attachfrom->next; + attachfrom->next = c; + } + attachfrom = c; + nstackclients++; + } + i++; + } + selmon->nmaster = nstackclients; + arrange(selmon); +}
\ No newline at end of file |
