From 11e94c406bb75c9a8990ce99489798411deb110c Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sat, 2 May 2020 18:00:00 +0200 Subject: [PATCH] layer shell: only send unmap on close if mapped --- types/wlr_layer_shell_v1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c index 46ab1e10..32e8b0bb 100644 --- a/types/wlr_layer_shell_v1.c +++ b/types/wlr_layer_shell_v1.c @@ -291,7 +291,9 @@ void wlr_layer_surface_v1_close(struct wlr_layer_surface_v1 *surface) { return; } surface->closed = true; - layer_surface_unmap(surface); + if (surface->mapped) { + layer_surface_unmap(surface); + } zwlr_layer_surface_v1_send_closed(surface->resource); }