diff --git a/src/animation/client.h b/src/animation/client.h index 53d9e2d2..238da9fb 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -291,7 +291,7 @@ void buffer_set_effect(Client *c, BufferData data) { data.corner_location = CORNER_LOCATION_NONE; } - if (c->mon->isoverview && config.ov_no_resize) { + if (c->overview_scene_surface) { wlr_scene_node_for_each_buffer( &c->scene_surface->node, scene_buffer_apply_overview_effect, &data); } else { @@ -822,7 +822,7 @@ void client_apply_clip(Client *c, float factor) { enum corner_location current_corner_location = set_client_corner_location(c); - if (!config.animations && !c->mon->isoverview) { + if (!config.animations && !c->overview_scene_surface) { c->animation.running = false; c->need_output_flush = false; c->animainit_geom = c->current = c->pending = c->animation.current = @@ -839,7 +839,7 @@ void client_apply_clip(Client *c, float factor) { return; } - if (!c->mon->isoverview || !config.ov_no_resize) { + if (!c->overview_scene_surface) { wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip_box); } @@ -891,7 +891,7 @@ void client_apply_clip(Client *c, float factor) { } // 应用窗口表面剪切 - if (!c->mon->isoverview || !config.ov_no_resize) { + if (!c->overview_scene_surface) { wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip_box); } @@ -907,7 +907,7 @@ void client_apply_clip(Client *c, float factor) { buffer_data.height = clip_box.height; buffer_data.corner_location = current_corner_location; - if (factor == 1.0 && !c->mon->isoverview) { + if (factor == 1.0 && !c->overview_scene_surface) { buffer_data.width_scale = 1.0; buffer_data.height_scale = 1.0; } else { diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index 6710ba58..01125cbc 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -1265,6 +1265,9 @@ int32_t toggle_named_scratchpad(const Arg *arg) { char *arg_id = arg->v; char *arg_title = arg->v2; + if (selmon && selmon->isoverview) + return 0; + target_client = get_client_by_id_or_title(arg_id, arg_title); if (!target_client && arg->v3) { @@ -1743,7 +1746,8 @@ int32_t toggleoverview(const Arg *arg) { wl_list_for_each(c, &clients, link) { if (c && c->mon == selmon && !client_is_unmanaged(c) && - !client_is_x11_popup(c) && !c->isunglobal) { + !client_is_x11_popup(c) && !c->isunglobal && !c->isminimized && + client_surface(c)->mapped) { c->animation.overining = true; overview_backup(c); } @@ -1752,7 +1756,7 @@ int32_t toggleoverview(const Arg *arg) { selmon->tagset[selmon->seltags] = target; wl_list_for_each(c, &clients, link) { if (c && c->mon == selmon && !c->iskilling && - !client_is_unmanaged(c) && !c->isunglobal && + !client_is_unmanaged(c) && !c->isunglobal && !c->isminimized && !client_is_x11_popup(c) && client_surface(c)->mapped) { overview_restore(c, &(Arg){.ui = target}); } diff --git a/src/mango.c b/src/mango.c index 2aa292ac..59e11262 100644 --- a/src/mango.c +++ b/src/mango.c @@ -1234,7 +1234,7 @@ void swallow(Client *c, Client *w) { w->overview_scene_surface = NULL; } - if (c->mon && c->mon->isoverview) { + if (c->mon && c->mon->isoverview && config.ov_no_resize) { overview_backup_surface(c); }