opt: optimize code struct
This commit is contained in:
@@ -335,3 +335,19 @@ focustop(Monitor *m) {
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Client *get_next_stack_client(Client *c, bool reverse) {
|
||||
Client *next = NULL;
|
||||
if (reverse) {
|
||||
wl_list_for_each_reverse(next, &c->link, link) {
|
||||
if (VISIBLEON(next, c->mon) && next != c)
|
||||
return next;
|
||||
}
|
||||
} else {
|
||||
wl_list_for_each(next, &c->link, link) {
|
||||
if (VISIBLEON(next, c->mon) && next != c)
|
||||
return next;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user