mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 04:45:58 +01:00
xwayland/shell: actually use wlr_xwayland_surface_v1.link
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3575
This commit is contained in:
parent
677a3f2f88
commit
b355a12751
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue