aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-06-23 14:33:26 +0200
committerSimon Ser <contact@emersion.fr>2023-06-23 14:33:26 +0200
commit8a5b5e6f28dae650df36a271213655b8bdf52dbf (patch)
tree61a34b26000b56501b9f9114fa66bec507705a58 /xwayland
parent89cb4842208a2997cfa3a9bef7ac66e01a414ebb (diff)
compositor: listen to role_resource destroy signal
Call wlr_surface_destroy_role_object() when the role_resource is destroyed.
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/shell.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/xwayland/shell.c b/xwayland/shell.c
index 28f572d3..87008c6b 100644
--- a/xwayland/shell.c
+++ b/xwayland/shell.c
@@ -91,14 +91,6 @@ static void xwl_surface_handle_surface_destroy(struct wl_listener *listener,
wlr_surface_destroy_role_object(xwl_surface->surface);
}
-static void xwl_surface_handle_resource_destroy(struct wl_resource *resource) {
- struct wlr_xwayland_surface_v1 *xwl_surface =
- xwl_surface_from_resource(resource);
- if (xwl_surface != NULL) {
- wlr_surface_destroy_role_object(xwl_surface->surface);
- }
-}
-
static void shell_handle_get_xwayland_surface(struct wl_client *client,
struct wl_resource *shell_resource, uint32_t id,
struct wl_resource *surface_resource) {
@@ -129,7 +121,7 @@ static void shell_handle_get_xwayland_surface(struct wl_client *client,
return;
}
wl_resource_set_implementation(xwl_surface->resource, &xwl_surface_impl,
- xwl_surface, xwl_surface_handle_resource_destroy);
+ xwl_surface, NULL);
wlr_surface_set_role_object(surface, xwl_surface->resource);