aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2023-02-03 16:37:35 +0300
committerKirill Primak <vyivel@eclair.cafe>2023-02-03 16:38:12 +0300
commitb355a12751f407a1a4277ed934328395584ef567 (patch)
tree74bb71f3de820997deadec37ba346626606a3753
parent677a3f2f8847ed2de49dd60868f9d9487a546f58 (diff)
xwayland/shell: actually use wlr_xwayland_surface_v1.link
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3575
-rw-r--r--xwayland/shell.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xwayland/shell.c b/xwayland/shell.c
index e48d6283..8d34ea04 100644
--- a/xwayland/shell.c
+++ b/xwayland/shell.c
@@ -50,6 +50,7 @@ static void xwl_surface_role_commit(struct wlr_surface *surface) {
static void xwl_surface_role_destroy(struct wlr_surface *surface) {
struct wlr_xwayland_surface_v1 *xwl_surface = surface->role_data;
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);
}
@@ -130,6 +131,8 @@ static void shell_handle_get_xwayland_surface(struct wl_client *client,
wl_resource_set_implementation(xwl_surface->resource, &xwl_surface_impl,
xwl_surface, xwl_surface_handle_resource_destroy);
+ 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);
}