From 0bee7ff4eecd2bdd0f67f588a4238767c5288d2f Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 21 Jun 2022 20:13:17 +0100 Subject: [PATCH] desktop-shell: Actually dirty surface regions when moving weston_view_geometry_dirty() won't automatically clear out the old region, so manually damage underneath the view before we mark the geometry dirty. Signed-off-by: Daniel Stone --- desktop-shell/shell.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 0969ec8c..27c9e878 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -1721,8 +1721,12 @@ shell_surface_update_layer(struct shell_surface *shsurf) if (new_layer_link == &shsurf->view->layer_link) return; + /* Dirty the view's old region, and remove it from the layer. */ + weston_view_damage_below(shsurf->view); weston_view_geometry_dirty(shsurf->view); weston_layer_entry_remove(&shsurf->view->layer_link); + + /* Add the surface to the new layer and dirty its new region. */ weston_layer_entry_insert(new_layer_link, &shsurf->view->layer_link); weston_view_geometry_dirty(shsurf->view); weston_surface_damage(surface);