opt: optimize xwayland focus ignore judge

This commit is contained in:
DreamMaoMao
2025-11-06 19:45:16 +08:00
parent 6bd9172fb2
commit 474c704562
5 changed files with 34 additions and 17 deletions

View File

@@ -131,7 +131,7 @@ int focuslast(const Arg *arg) {
wl_list_for_each(c, &fstack, flink) {
if (c->iskilling || c->isminied || c->isunglobal ||
!client_surface(c)->mapped || client_is_unmanaged(c) ||
client_should_ignore_focus(c))
client_should_ignore_focus_open(c))
continue;
if (selmon && !selmon->sel) {
@@ -1460,7 +1460,7 @@ int toggleoverview(const Arg *arg) {
wl_list_for_each(c, &clients,
link) if (c && c->mon == selmon &&
!client_is_unmanaged(c) &&
!client_should_ignore_focus(c) &&
!client_should_ignore_focus_open(c) &&
!c->isminied && !c->isunglobal) {
visible_client_number++;
}
@@ -1484,14 +1484,15 @@ int toggleoverview(const Arg *arg) {
if (selmon->isoverview) {
wl_list_for_each(c, &clients, link) {
if (c && c->mon == selmon && !client_is_unmanaged(c) &&
!client_should_ignore_focus(c) && !c->isunglobal)
!client_should_ignore_focus_open(c) && !c->isunglobal)
overview_backup(c);
}
} else {
wl_list_for_each(c, &clients, link) {
if (c && c->mon == selmon && !c->iskilling &&
!client_is_unmanaged(c) && !c->isunglobal &&
!client_should_ignore_focus(c) && client_surface(c)->mapped)
!client_should_ignore_focus_open(c) &&
client_surface(c)->mapped)
overview_restore(c, &(Arg){.ui = target});
}
}