mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-13 13:29:55 -05:00
opt: optimize code struct
This commit is contained in:
parent
ba30fb86e7
commit
0b43c70352
3 changed files with 20 additions and 17 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue