Adding transferall patch
This commit is contained in:
@ -131,6 +131,9 @@
|
||||
#if TRANSFER_PATCH
|
||||
#include "transfer.c"
|
||||
#endif
|
||||
#if TRANSFER_ALL_PATCH
|
||||
#include "transferall.c"
|
||||
#endif
|
||||
#if UNFLOATVISIBLE_PATCH
|
||||
#include "unfloatvisible.c"
|
||||
#endif
|
||||
|
@ -131,6 +131,9 @@
|
||||
#if TRANSFER_PATCH
|
||||
#include "transfer.h"
|
||||
#endif
|
||||
#if TRANSFER_ALL_PATCH
|
||||
#include "transferall.h"
|
||||
#endif
|
||||
#if UNFLOATVISIBLE_PATCH
|
||||
#include "unfloatvisible.h"
|
||||
#endif
|
||||
|
25
patch/transferall.c
Normal file
25
patch/transferall.c
Normal file
@ -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);
|
||||
}
|
1
patch/transferall.h
Normal file
1
patch/transferall.h
Normal file
@ -0,0 +1 @@
|
||||
static void transferall(const Arg *arg);
|
Reference in New Issue
Block a user