mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-10 04:27:57 -05:00
opt: optimize xwayland focus ignore judge
This commit is contained in:
parent
a90027e16b
commit
38bc6b2ffc
5 changed files with 34 additions and 17 deletions
|
|
@ -132,7 +132,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) {
|
||||
|
|
@ -1463,7 +1463,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++;
|
||||
}
|
||||
|
|
@ -1487,14 +1487,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});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue