From 56958aa6e9c7c20909c99e978514d99a3c943ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 1 Oct 2021 11:12:21 +0200 Subject: [PATCH] desktop-shell: Damage subsurfaces when minimizing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes an issue where subsurface extending outside of the main surface wasn't damaged when minimized resulting in left-over content. Signed-off-by: Jonas Ã…dahl --- desktop-shell/shell.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index caaca316e..d57e2b0db 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2057,6 +2057,7 @@ set_minimized(struct weston_surface *surface) struct shell_surface *shsurf; struct workspace *current_ws; struct weston_view *view; + struct weston_subsurface *subsurface; view = get_default_view(surface); if (!view) @@ -2074,7 +2075,12 @@ set_minimized(struct weston_surface *surface) surface_keyboard_focus_lost(surface); shell_surface_update_child_surface_layers(shsurf); - weston_view_damage_below(view); + + weston_view_damage_below(shsurf->view); + wl_list_for_each(subsurface, &surface->subsurface_list, parent_link) { + wl_list_for_each(view, &subsurface->surface->views, surface_link) + weston_view_damage_below(view); + } }