mirror of
https://github.com/mintycube/dotfiles.git
synced 2024-10-22 14:05:41 +02:00
23 lines
437 B
C
23 lines
437 B
C
void
|
|
attachx(Client *c)
|
|
{
|
|
Client *at;
|
|
|
|
if (c->idx > 0) { /* then the client has a designated position in the client list */
|
|
for (at = c->mon->clients; at; at = at->next) {
|
|
if (c->idx < at->idx) {
|
|
c->next = at;
|
|
c->mon->clients = c;
|
|
return;
|
|
} else if (at->idx <= c->idx && (!at->next || c->idx <= at->next->idx)) {
|
|
c->next = at->next;
|
|
at->next = c;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
attach(c); // master (default)
|
|
}
|
|
|