|
|
@ -5,42 +5,12 @@ |
|
|
|
|
|
|
|
|
|
|
|
/* static */ |
|
|
|
/* static */ |
|
|
|
|
|
|
|
|
|
|
|
static Client * |
|
|
|
|
|
|
|
minclient(void) { |
|
|
|
|
|
|
|
Client *c, *min; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if((clients && clients->isfloat) || arrange == dofloat) |
|
|
|
|
|
|
|
return clients; /* don't touch floating order */ |
|
|
|
|
|
|
|
for(min = c = clients; c; c = c->next) |
|
|
|
|
|
|
|
if(c->weight < min->weight) |
|
|
|
|
|
|
|
min = c; |
|
|
|
|
|
|
|
return min; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static Client * |
|
|
|
static Client * |
|
|
|
nexttiled(Client *c) { |
|
|
|
nexttiled(Client *c) { |
|
|
|
for(c = getnext(c); c && c->isfloat; c = getnext(c->next)); |
|
|
|
for(c = getnext(c); c && c->isfloat; c = getnext(c->next)); |
|
|
|
return c; |
|
|
|
return c; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
|
|
|
reorder(void) { |
|
|
|
|
|
|
|
Client *c, *newclients, *tail; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
newclients = tail = NULL; |
|
|
|
|
|
|
|
while((c = minclient())) { |
|
|
|
|
|
|
|
detach(c); |
|
|
|
|
|
|
|
if(tail) { |
|
|
|
|
|
|
|
c->prev = tail; |
|
|
|
|
|
|
|
tail->next = c; |
|
|
|
|
|
|
|
tail = c; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
tail = newclients = c; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
clients = newclients; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
togglemax(Client *c) { |
|
|
|
togglemax(Client *c) { |
|
|
|
XEvent ev; |
|
|
|
XEvent ev; |
|
|
@ -247,7 +217,6 @@ toggleview(Arg *arg) { |
|
|
|
for(i = 0; i < ntags && !seltag[i]; i++); |
|
|
|
for(i = 0; i < ntags && !seltag[i]; i++); |
|
|
|
if(i == ntags) |
|
|
|
if(i == ntags) |
|
|
|
seltag[arg->i] = True; /* cannot toggle last view */ |
|
|
|
seltag[arg->i] = True; /* cannot toggle last view */ |
|
|
|
reorder(); |
|
|
|
|
|
|
|
arrange(); |
|
|
|
arrange(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -258,7 +227,6 @@ view(Arg *arg) { |
|
|
|
for(i = 0; i < ntags; i++) |
|
|
|
for(i = 0; i < ntags; i++) |
|
|
|
seltag[i] = False; |
|
|
|
seltag[i] = False; |
|
|
|
seltag[arg->i] = True; |
|
|
|
seltag[arg->i] = True; |
|
|
|
reorder(); |
|
|
|
|
|
|
|
arrange(); |
|
|
|
arrange(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -268,7 +236,6 @@ viewall(Arg *arg) { |
|
|
|
|
|
|
|
|
|
|
|
for(i = 0; i < ntags; i++) |
|
|
|
for(i = 0; i < ntags; i++) |
|
|
|
seltag[i] = True; |
|
|
|
seltag[i] = True; |
|
|
|
reorder(); |
|
|
|
|
|
|
|
arrange(); |
|
|
|
arrange(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|