|
@ -51,7 +51,7 @@ dofloat(Arg *arg) |
|
|
|
|
|
|
|
|
for(c = clients; c; c = c->next) { |
|
|
for(c = clients; c; c = c->next) { |
|
|
c->ismax = False; |
|
|
c->ismax = False; |
|
|
if(c->tags[tsel]) { |
|
|
|
|
|
|
|
|
if(isvisible(c)) { |
|
|
resize(c, True, TopLeft); |
|
|
resize(c, True, TopLeft); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
@ -74,7 +74,7 @@ dotile(Arg *arg) |
|
|
|
|
|
|
|
|
w = sw - mw; |
|
|
w = sw - mw; |
|
|
for(n = 0, c = clients; c; c = c->next) |
|
|
for(n = 0, c = clients; c; c = c->next) |
|
|
if(c->tags[tsel] && !c->isfloat) |
|
|
|
|
|
|
|
|
if(isvisible(c) && !c->isfloat) |
|
|
n++; |
|
|
n++; |
|
|
|
|
|
|
|
|
if(n > 1) |
|
|
if(n > 1) |
|
@ -84,7 +84,7 @@ dotile(Arg *arg) |
|
|
|
|
|
|
|
|
for(i = 0, c = clients; c; c = c->next) { |
|
|
for(i = 0, c = clients; c; c = c->next) { |
|
|
c->ismax = False; |
|
|
c->ismax = False; |
|
|
if(c->tags[tsel]) { |
|
|
|
|
|
|
|
|
if(isvisible(c)) { |
|
|
if(c->isfloat) { |
|
|
if(c->isfloat) { |
|
|
higher(c); |
|
|
higher(c); |
|
|
resize(c, True, TopLeft); |
|
|
resize(c, True, TopLeft); |
|
@ -135,14 +135,14 @@ dotile(Arg *arg) |
|
|
Client * |
|
|
Client * |
|
|
getnext(Client *c) |
|
|
getnext(Client *c) |
|
|
{ |
|
|
{ |
|
|
for(; c && !c->tags[tsel]; c = c->next); |
|
|
|
|
|
|
|
|
for(; c && !isvisible(c); c = c->next); |
|
|
return c; |
|
|
return c; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Client * |
|
|
Client * |
|
|
getprev(Client *c) |
|
|
getprev(Client *c) |
|
|
{ |
|
|
{ |
|
|
for(; c && !c->tags[tsel]; c = c->prev); |
|
|
|
|
|
|
|
|
for(; c && !isvisible(c); c = c->prev); |
|
|
return c; |
|
|
return c; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -175,6 +175,17 @@ initrregs() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Bool |
|
|
|
|
|
isvisible(Client *c) |
|
|
|
|
|
{ |
|
|
|
|
|
unsigned int i; |
|
|
|
|
|
|
|
|
|
|
|
for(i = 0; i < ntags; i++) |
|
|
|
|
|
if(c->tags[i] && tsel[i]) |
|
|
|
|
|
return True; |
|
|
|
|
|
return False; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void |
|
|
void |
|
|
replacetag(Arg *arg) |
|
|
replacetag(Arg *arg) |
|
|
{ |
|
|
{ |
|
@ -217,7 +228,8 @@ settags(Client *c) |
|
|
XFree(ch.res_name); |
|
|
XFree(ch.res_name); |
|
|
} |
|
|
} |
|
|
if(!matched) |
|
|
if(!matched) |
|
|
c->tags[tsel] = True; |
|
|
|
|
|
|
|
|
for(i = 0; i < ntags; i++) |
|
|
|
|
|
c->tags[i] = tsel[i]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void |
|
|
void |
|
@ -230,7 +242,11 @@ togglemode(Arg *arg) |
|
|
void |
|
|
void |
|
|
view(Arg *arg) |
|
|
view(Arg *arg) |
|
|
{ |
|
|
{ |
|
|
tsel = arg->i; |
|
|
|
|
|
|
|
|
unsigned int i; |
|
|
|
|
|
|
|
|
|
|
|
for(i = 0; i < ntags; i++) |
|
|
|
|
|
tsel[i] = False; |
|
|
|
|
|
tsel[arg->i] = True; |
|
|
arrange(NULL); |
|
|
arrange(NULL); |
|
|
drawall(); |
|
|
drawall(); |
|
|
} |
|
|
} |
|
@ -238,13 +254,19 @@ view(Arg *arg) |
|
|
void |
|
|
void |
|
|
viewnext(Arg *arg) |
|
|
viewnext(Arg *arg) |
|
|
{ |
|
|
{ |
|
|
arg->i = (tsel < ntags-1) ? tsel+1 : 0; |
|
|
|
|
|
|
|
|
unsigned int i; |
|
|
|
|
|
|
|
|
|
|
|
for(i = 0; !tsel[i]; i++); |
|
|
|
|
|
arg->i = (i < ntags-1) ? i+1 : 0; |
|
|
view(arg); |
|
|
view(arg); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void |
|
|
void |
|
|
viewprev(Arg *arg) |
|
|
viewprev(Arg *arg) |
|
|
{ |
|
|
{ |
|
|
arg->i = (tsel > 0) ? tsel-1 : ntags-1; |
|
|
|
|
|
|
|
|
unsigned int i; |
|
|
|
|
|
|
|
|
|
|
|
for(i = 0; !tsel[i]; i++); |
|
|
|
|
|
arg->i = (i > 0) ? i-1 : ntags-1; |
|
|
view(arg); |
|
|
view(arg); |
|
|
} |
|
|
} |