Adding push no master variant patch
This commit is contained in:
@@ -40,7 +40,9 @@
|
||||
#include "pertag.c"
|
||||
#endif
|
||||
|
||||
#if PUSH_PATCH
|
||||
#if PUSH_NO_MASTER_PATCH
|
||||
#include "push_no_master.c"
|
||||
#elif PUSH_PATCH
|
||||
#include "push.c"
|
||||
#endif
|
||||
|
||||
|
@@ -36,7 +36,9 @@
|
||||
#include "ewmhtags.h"
|
||||
#endif
|
||||
|
||||
#if PUSH_PATCH
|
||||
#if PUSH_NO_MASTER_PATCH
|
||||
#include "push_no_master.h"
|
||||
#elif PUSH_PATCH
|
||||
#include "push.h"
|
||||
#endif
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Client *
|
||||
static Client *
|
||||
nextc(Client *c, float f)
|
||||
{
|
||||
if (!f)
|
||||
@@ -34,7 +34,7 @@ pushup(const Arg *arg)
|
||||
if (selmon->clients == c)
|
||||
selmon->clients = sel;
|
||||
else {
|
||||
for (c = selmon->clients; c->next != sel->next; c = c->next);
|
||||
for (c f selmon->clients; c->next != sel->next; c = c->next);
|
||||
c->next = sel;
|
||||
}
|
||||
} else {
|
||||
|
43
patch/push_no_master.c
Normal file
43
patch/push_no_master.c
Normal file
@@ -0,0 +1,43 @@
|
||||
Client *
|
||||
prevt(Client *c)
|
||||
{
|
||||
Client *p, *r;
|
||||
|
||||
for (p = selmon->clients, r = NULL; p && p != c; p = p->next)
|
||||
if (!p->isfloating && ISVISIBLE(p))
|
||||
r = p;
|
||||
return r;
|
||||
}
|
||||
|
||||
void
|
||||
pushup(const Arg *arg)
|
||||
{
|
||||
Client *sel = selmon->sel, *c;
|
||||
|
||||
if (!sel || sel->isfloating)
|
||||
return;
|
||||
if ((c = prevt(sel)) && c != nexttiled(selmon->clients)) {
|
||||
detach(sel);
|
||||
sel->next = c;
|
||||
for (c = selmon->clients; c->next != sel->next; c = c->next);
|
||||
c->next = sel;
|
||||
}
|
||||
focus(sel);
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
void
|
||||
pushdown(const Arg *arg)
|
||||
{
|
||||
Client *sel = selmon->sel, *c;
|
||||
|
||||
if (!sel || sel->isfloating || sel == nexttiled(selmon->clients))
|
||||
return;
|
||||
if ((c = nexttiled(sel->next))) {
|
||||
detach(sel);
|
||||
sel->next = c->next;
|
||||
c->next = sel;
|
||||
}
|
||||
focus(sel);
|
||||
arrange(selmon);
|
||||
}
|
3
patch/push_no_master.h
Normal file
3
patch/push_no_master.h
Normal file
@@ -0,0 +1,3 @@
|
||||
Client * prevt(Client *c);
|
||||
static void pushup(const Arg *arg);
|
||||
static void pushdown(const Arg *arg);
|
Reference in New Issue
Block a user