shell: Only animate window closing for mapped windows
https://bugs.freedesktop.org/show_bug.cgi?id=76415
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index f9fedac..30d63c4 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -3040,7 +3040,9 @@
pixman_region32_init(&shsurf->surface->pending.input);
pixman_region32_fini(&shsurf->surface->input);
pixman_region32_init(&shsurf->surface->input);
- weston_fade_run(shsurf->view, 1.0, 0.0, 300.0, fade_out_done, shsurf);
+ if (weston_surface_is_mapped(shsurf->surface))
+ weston_fade_run(shsurf->view, 1.0, 0.0, 300.0,
+ fade_out_done, shsurf);
}
static void