mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-31 22:25:29 -04:00
opt: optimize code struct
This commit is contained in:
parent
53b8fa4597
commit
78990f66ff
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