aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/layer_shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r--sway/desktop/layer_shell.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index f0134396..4b2584b6 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -137,6 +137,7 @@ static struct sway_layer_surface *sway_layer_surface_create(
surface->scene = scene;
surface->layer_surface = scene->layer_surface;
surface->popups = popups;
+ surface->layer_surface->data = surface;
return surface;
}
@@ -210,6 +211,8 @@ static void handle_node_destroy(struct wl_listener *listener, void *data) {
wl_list_remove(&layer->node_destroy.link);
wl_list_remove(&layer->output_destroy.link);
+ layer->layer_surface->data = NULL;
+
free(layer);
}