mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-05 06:47:12 -04:00
Merge branch 'main' into feature/dual-row-scroller
This commit is contained in:
commit
a1f4cbb282
20 changed files with 695 additions and 444 deletions
|
|
@ -389,30 +389,21 @@ Client *focustop(Monitor *m) {
|
|||
|
||||
Client *get_next_stack_client(Client *c, bool reverse) {
|
||||
if (!c || !c->mon)
|
||||
return NULL; // 添加输入检查
|
||||
return NULL;
|
||||
|
||||
Client *next = NULL;
|
||||
if (reverse) {
|
||||
wl_list_for_each_reverse(next, &c->link, link) {
|
||||
if (!next)
|
||||
continue; // 安全检查
|
||||
if (&next->link == &clients)
|
||||
continue; /* wrap past the sentinel node */
|
||||
|
||||
if (c->mon->has_visible_fullscreen_client && !next->isfloating &&
|
||||
!next->isfullscreen)
|
||||
continue;
|
||||
|
||||
// 添加更安全的 VISIBLEON 检查
|
||||
if (next != c && next->mon && VISIBLEON(next, c->mon))
|
||||
return next;
|
||||
}
|
||||
} else {
|
||||
wl_list_for_each(next, &c->link, link) {
|
||||
if (!next)
|
||||
continue; // 安全检查
|
||||
|
||||
if (c->mon->has_visible_fullscreen_client && !next->isfloating &&
|
||||
!next->isfullscreen)
|
||||
continue;
|
||||
if (&next->link == &clients)
|
||||
continue; /* wrap past the sentinel node */
|
||||
|
||||
if (next != c && next->mon && VISIBLEON(next, c->mon))
|
||||
return next;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue