aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--types/wlr_layer_shell_v1.c4
1 files changed, 3 insertions, 1 deletions
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);
}