|
@ -13,6 +13,22 @@ static unsigned int nlayouts = 0; |
|
|
static unsigned int masterw = MASTERWIDTH; |
|
|
static unsigned int masterw = MASTERWIDTH; |
|
|
static unsigned int nmaster = NMASTER; |
|
|
static unsigned int nmaster = NMASTER; |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
|
ban(Client *c) { |
|
|
|
|
|
if (c->isbanned) |
|
|
|
|
|
return; |
|
|
|
|
|
XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); |
|
|
|
|
|
c->isbanned = True; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
|
unban(Client *c) { |
|
|
|
|
|
if (!c->isbanned) |
|
|
|
|
|
return; |
|
|
|
|
|
XMoveWindow(dpy, c->win, c->x, c->y); |
|
|
|
|
|
c->isbanned = False; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
static void |
|
|
static void |
|
|
tile(void) { |
|
|
tile(void) { |
|
|
unsigned int i, n, nx, ny, nw, nh, mw, mh, tw, th; |
|
|
unsigned int i, n, nx, ny, nw, nh, mw, mh, tw, th; |
|
@ -28,9 +44,7 @@ tile(void) { |
|
|
|
|
|
|
|
|
for(i = 0, c = clients; c; c = c->next) |
|
|
for(i = 0, c = clients; c; c = c->next) |
|
|
if(isvisible(c)) { |
|
|
if(isvisible(c)) { |
|
|
if(c->isbanned) |
|
|
|
|
|
XMoveWindow(dpy, c->win, c->x, c->y); |
|
|
|
|
|
c->isbanned = False; |
|
|
|
|
|
|
|
|
unban(c); |
|
|
if(c->isfloating) |
|
|
if(c->isfloating) |
|
|
continue; |
|
|
continue; |
|
|
c->ismax = False; |
|
|
c->ismax = False; |
|
@ -60,12 +74,9 @@ tile(void) { |
|
|
resize(c, nx, ny, nw, nh, False); |
|
|
resize(c, nx, ny, nw, nh, False); |
|
|
i++; |
|
|
i++; |
|
|
} |
|
|
} |
|
|
else { |
|
|
|
|
|
c->isbanned = True; |
|
|
|
|
|
XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); |
|
|
|
|
|
} |
|
|
|
|
|
if(!sel || !isvisible(sel)) |
|
|
|
|
|
focustopvisible(); |
|
|
|
|
|
|
|
|
else |
|
|
|
|
|
ban(c); |
|
|
|
|
|
focus(NULL); |
|
|
restack(); |
|
|
restack(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -77,20 +88,16 @@ void |
|
|
floating(void) { |
|
|
floating(void) { |
|
|
Client *c; |
|
|
Client *c; |
|
|
|
|
|
|
|
|
for(c = clients; c; c = c->next) { |
|
|
|
|
|
|
|
|
for(c = clients; c; c = c->next) |
|
|
if(isvisible(c)) { |
|
|
if(isvisible(c)) { |
|
|
if(c->isbanned) |
|
|
if(c->isbanned) |
|
|
XMoveWindow(dpy, c->win, c->x, c->y); |
|
|
XMoveWindow(dpy, c->win, c->x, c->y); |
|
|
c->isbanned = False; |
|
|
c->isbanned = False; |
|
|
resize(c, c->x, c->y, c->w, c->h, True); |
|
|
resize(c, c->x, c->y, c->w, c->h, True); |
|
|
} |
|
|
} |
|
|
else { |
|
|
|
|
|
c->isbanned = True; |
|
|
|
|
|
XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if(!sel || !isvisible(sel)) |
|
|
|
|
|
focustopvisible(); |
|
|
|
|
|
|
|
|
else |
|
|
|
|
|
ban(c); |
|
|
|
|
|
focus(NULL); |
|
|
restack(); |
|
|
restack(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|