diff --git a/src/animation/client.h b/src/animation/client.h index d3e6f4de..a7f2fe22 100644 --- a/src/animation/client.h +++ b/src/animation/client.h @@ -366,6 +366,7 @@ void client_draw_title(Client *c) { void apply_shield(Client *c, struct wlr_box clip_box) { if (clip_box.width <= 0 || clip_box.height <= 0) { + wlr_scene_node_set_enabled(&c->shield->node, false); return; } @@ -887,6 +888,14 @@ void client_apply_clip(Client *c, float factor) { apply_shield(c, clip_box); if (clip_box.width <= 0 || clip_box.height <= 0) { + should_render_client_surface = false; + wlr_scene_node_set_enabled(&c->scene_surface->node, false); + } else { + should_render_client_surface = true; + wlr_scene_node_set_enabled(&c->scene_surface->node, true); + } + + if (!should_render_client_surface) { return; } diff --git a/src/mango.c b/src/mango.c index efcdd7d9..b9b9ee9b 100644 --- a/src/mango.c +++ b/src/mango.c @@ -1330,10 +1330,6 @@ void client_replace(Client *c, Client *w, bool is_group_change_member, mango_group_bar_set_focus(c->group_bar, c->isgroupfocusing); if (w->overview_scene_surface) { - - wlr_scene_node_reparent(&w->shield->node, w->overview_scene_surface); - wlr_scene_node_raise_to_top(&w->shield->node); - wlr_scene_node_destroy(&w->scene_surface->node); w->scene_surface = w->overview_scene_surface; w->overview_scene_surface = NULL; @@ -6737,7 +6733,6 @@ void unmapnotify(struct wl_listener *listener, void *data) { c->ext_foreign_toplevel = NULL; } - if (c->swallowing) { setmaximizescreen(c->swallowing, c->ismaximizescreen, true); setfullscreen(c->swallowing, c->isfullscreen, true); @@ -6754,7 +6749,7 @@ void unmapnotify(struct wl_listener *listener, void *data) { mango_jump_label_node_destroy(c->jump_label_node); c->jump_label_node = NULL; } - + if (c->group_bar) { mango_group_bar_destroy(c->group_bar); c->group_bar = NULL;