diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-24 18:00:01 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-27 18:50:32 -0400 |
commit | d1c0e6fe2c21b4c7f651a82fb7342b54a4989c39 (patch) | |
tree | 2267e9a27e454f09c3145ddbffaa1ec91de9b556 /rootston | |
parent | b73c4f48c10ae79a33d1611fb641d22b8b619c39 (diff) |
Add layer_surface.close
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/layer_shell.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rootston/layer_shell.c b/rootston/layer_shell.c index ac7b2b20..114a5f29 100644 --- a/rootston/layer_shell.c +++ b/rootston/layer_shell.c @@ -118,7 +118,7 @@ static void handle_output_destroy(struct wl_listener *listener, void *data) { struct roots_layer_surface *layer = wl_container_of(listener, layer, output_destroy); layer->layer_surface->output = NULL; - wl_resource_destroy(layer->layer_surface->resource); + wlr_layer_surface_close(layer->layer_surface); } static void handle_surface_commit(struct wl_listener *listener, void *data) { @@ -135,7 +135,9 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) { static void unmap(struct wlr_layer_surface *layer_surface) { struct roots_layer_surface *layer = layer_surface->data; - wl_list_remove(&layer->link); + if (layer->link.prev) { + wl_list_remove(&layer->link); + } struct wlr_output *wlr_output = layer_surface->output; if (wlr_output != NULL) { |