[PATCH 0/1] MR11104: winewayland: Do not place_above on a detached client surface.
``` if (toplevel && NtUserIsWindowVisible(hwnd)) wayland_client_surface_attach(client, toplevel); else wayland_client_surface_attach(client, NULL); ``` The above shows up in a few places in winewayland. What ends up happening is that the client surface gets detached, but its pointer is still present in wayland_win_data->client_surface. wayland_surface_reconfigure_subsurface would then try to place itself above the detached client surface without first checking if the client surface has a subsurface (i.e it is attached). Alternatively, we could check if the client surface has a toplevel hwnd set, but this is equivalent and clearer imo. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11104
From: Etaash Mathamsetty <etaash.mathamsetty@gmail.com> --- dlls/winewayland.drv/wayland_surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winewayland.drv/wayland_surface.c b/dlls/winewayland.drv/wayland_surface.c index 2f8275ddb52..4058c452a6f 100644 --- a/dlls/winewayland.drv/wayland_surface.c +++ b/dlls/winewayland.drv/wayland_surface.c @@ -688,7 +688,7 @@ static void wayland_surface_reconfigure_subsurface(struct wayland_surface *surfa TRACE("hwnd=%p pos=%d,%d\n", surface->hwnd, x, y); wl_subsurface_set_position(surface->wl_subsurface, x, y); - if (toplevel_data->client_surface) + if (toplevel_data->client_surface && toplevel_data->client_surface->wl_subsurface) wl_subsurface_place_above(surface->wl_subsurface, toplevel_data->client_surface->wl_surface); else wl_subsurface_place_above(surface->wl_subsurface, toplevel_surface->wl_surface); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11104
This merge request was approved by Rémi Bernon. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11104
participants (3)
-
Etaash Mathamsetty -
Etaash Mathamsetty (@etaash.mathamsetty) -
Rémi Bernon (@rbernon)