Merge branch 'main' into feat/focus-animation

This commit is contained in:
DreamMaoMao
2025-11-01 19:27:09 +08:00
committed by GitHub
8 changed files with 36 additions and 188 deletions

View File

@@ -340,21 +340,33 @@ Client *focustop(Monitor *m) {
}
Client *get_next_stack_client(Client *c, bool reverse) {
if (!c || !c->mon)
return NULL; // 添加输入检查
Client *next = NULL;
if (reverse) {
wl_list_for_each_reverse(next, &c->link, link) {
if (!next)
continue; // 安全检查
if (c->mon->has_visible_fullscreen_client && !next->isfloating &&
!next->isfullscreen)
continue;
if (VISIBLEON(next, c->mon) && next != c)
// 添加更安全的 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 (VISIBLEON(next, c->mon) && next != c)
if (next != c && next->mon && VISIBLEON(next, c->mon))
return next;
}
}