diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2023-07-26 23:18:45 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-07-26 20:31:03 +0000 |
commit | 529f1b82ee73939071eb9fd59cbd9318d47d2525 (patch) | |
tree | db8904c2e8a62833ccca510e5b9c6a05df5c6e36 /xwayland/shell.c | |
parent | 307720d5019c62bb8dfeea9e2cb5638cec526553 (diff) |
xwayland/shell: don't listen to wlr_surface.events.destroy
The wlr_xwayland_surface_v1 will be destroyed automatically
from xwl_surface_role_destroy().
Diffstat (limited to 'xwayland/shell.c')
-rw-r--r-- | xwayland/shell.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/xwayland/shell.c b/xwayland/shell.c index 86ee59f4..9c5a9d20 100644 --- a/xwayland/shell.c +++ b/xwayland/shell.c @@ -16,7 +16,6 @@ static const struct xwayland_shell_v1_interface shell_impl; static const struct xwayland_surface_v1_interface xwl_surface_impl; static void xwl_surface_destroy(struct wlr_xwayland_surface_v1 *xwl_surface) { - wl_list_remove(&xwl_surface->surface_destroy.link); wl_list_remove(&xwl_surface->link); wl_resource_set_user_data(xwl_surface->resource, NULL); // make inert free(xwl_surface); @@ -95,13 +94,6 @@ static const struct xwayland_surface_v1_interface xwl_surface_impl = { .set_serial = xwl_surface_handle_set_serial, }; -static void xwl_surface_handle_surface_destroy(struct wl_listener *listener, - void *data) { - struct wlr_xwayland_surface_v1 *xwl_surface = - wl_container_of(listener, xwl_surface, surface_destroy); - xwl_surface_destroy(xwl_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) { @@ -134,12 +126,9 @@ static void shell_handle_get_xwayland_surface(struct wl_client *client, wl_resource_set_implementation(xwl_surface->resource, &xwl_surface_impl, xwl_surface, NULL); - wlr_surface_set_role_object(surface, xwl_surface->resource); - wl_list_insert(&shell->surfaces, &xwl_surface->link); - xwl_surface->surface_destroy.notify = xwl_surface_handle_surface_destroy; - wl_signal_add(&surface->events.destroy, &xwl_surface->surface_destroy); + wlr_surface_set_role_object(surface, xwl_surface->resource); } static const struct xwayland_shell_v1_interface shell_impl = { |