aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-31 00:22:09 -0400
committerDrew DeVault <sir@cmpwn.com>2018-03-31 00:22:09 -0400
commit1778818a50037f52b5b7fd58138b035b82c2aa4f (patch)
tree05c2c753f5d3685731f3bf8b35a2b9580090a91b
parentf133170ff0187247b13c227bd2527a273c54f13f (diff)
Don't destroying all layer surfaces on client d/c
-rw-r--r--types/wlr_layer_shell.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/types/wlr_layer_shell.c b/types/wlr_layer_shell.c
index cbf21f4a..b81fb4c6 100644
--- a/types/wlr_layer_shell.c
+++ b/types/wlr_layer_shell.c
@@ -353,10 +353,13 @@ static const struct zwlr_layer_shell_v1_interface layer_shell_implementation = {
};
static void client_handle_destroy(struct wl_resource *resource) {
+ struct wl_client *client = wl_resource_get_client(resource);
struct wlr_layer_shell *shell = layer_shell_from_resource(resource);
struct wlr_layer_surface *surface, *tmp = NULL;
wl_list_for_each_safe(surface, tmp, &shell->surfaces, link) {
- layer_surface_destroy(surface);
+ if (wl_resource_get_client(surface->resource) == client) {
+ layer_surface_destroy(surface);
+ }
}
wl_list_remove(wl_resource_get_link(resource));
}