aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-04-24 09:01:48 +0100
committerGitHub <noreply@github.com>2018-04-24 09:01:48 +0100
commit09b491f36c43e811671af9372ce84e422da1d207 (patch)
tree484f8ce9c80367e45c7deb5a059dcedbd16ee95a
parentc0831344aae7f103a077c836abbd5c9553c6ae95 (diff)
parent38064f1d182ec80dc87a2132cbcf010a5a14c606 (diff)
Merge pull request #893 from emersion/fix-subsurface-recreate
Fix protocol error when a client destroys and re-creates a subsurface
-rw-r--r--types/wlr_compositor.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c
index 57f3bd91..2d9eec0f 100644
--- a/types/wlr_compositor.c
+++ b/types/wlr_compositor.c
@@ -42,7 +42,8 @@ static void subcompositor_handle_get_subsurface(struct wl_client *client,
return;
}
- if (wlr_surface_is_subsurface(surface)) {
+ if (wlr_surface_is_subsurface(surface) &&
+ wlr_subsurface_from_surface(surface) != NULL) {
wl_resource_post_error(resource,
WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE,
"%s%d: wl_surface@%d is already a sub-surface",
@@ -101,11 +102,6 @@ static void subcompositor_finish(struct wlr_subcompositor *subcompositor) {
}
-
-
-
-
-
static const struct wl_compositor_interface wl_compositor_impl;
static struct wlr_compositor *compositor_from_resource(