opt: overview should exclude unmanaged and ignore focus window

This commit is contained in:
DreamMaoMao 2025-05-15 11:11:08 +08:00
parent 2850531b28
commit f2eb39ae95

View file

@ -6411,12 +6411,12 @@ void toggleoverview(const Arg *arg) {
// overview到正常视图,还原之前退出的浮动和全屏窗口状态 // overview到正常视图,还原之前退出的浮动和全屏窗口状态
if (selmon->isoverview) { if (selmon->isoverview) {
wl_list_for_each(c, &clients, link) { wl_list_for_each(c, &clients, link) {
if (c) if (c && !client_is_unmanaged(c) && !client_should_ignore_focus(c) )
overview_backup(c); overview_backup(c);
} }
} else { } else {
wl_list_for_each(c, &clients, link) { wl_list_for_each(c, &clients, link) {
if (c && !c->iskilling && client_surface(c)->mapped) if (c && !c->iskilling && !client_is_unmanaged(c) && !client_should_ignore_focus(c) && client_surface(c)->mapped)
overview_restore(c, &(Arg){.ui = target}); overview_restore(c, &(Arg){.ui = target});
} }
} }