From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/winewayland.drv/wayland_surface.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/dlls/winewayland.drv/wayland_surface.c b/dlls/winewayland.drv/wayland_surface.c index 284b692d13c..263d8c4f657 100644 --- a/dlls/winewayland.drv/wayland_surface.c +++ b/dlls/winewayland.drv/wayland_surface.c @@ -204,24 +204,14 @@ void wayland_surface_destroy(struct wayland_surface *surface) process_wayland.keyboard.focused_hwnd = NULL; pthread_mutex_unlock(&process_wayland.keyboard.mutex); + wayland_surface_clear_role(surface); + if (surface->wp_viewport) { wp_viewport_destroy(surface->wp_viewport); surface->wp_viewport = NULL; } - if (surface->xdg_toplevel) - { - xdg_toplevel_destroy(surface->xdg_toplevel); - surface->xdg_toplevel = NULL; - } - - if (surface->xdg_surface) - { - xdg_surface_destroy(surface->xdg_surface); - surface->xdg_surface = NULL; - } - if (surface->wl_surface) { wl_surface_destroy(surface->wl_surface); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6560