Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/window.c:
- struct wayland_surface *surface = data->wayland_surface; HWND parent = NtUserGetAncestor(data->hwnd, GA_PARENT); - BOOL visible, xdg_visible; + + /* We want a Wayland surface for toplevel windows. */ + if (!parent || parent == NtUserGetDesktopWindow()) return TRUE; + + /* We want to keep the Wayland surface if we have a client area subsurface. */ + if (data->wayland_surface) + { + BOOL has_client; + pthread_mutex_lock(&data->wayland_surface->mutex); + has_client = !!data->wayland_surface->client; + pthread_mutex_unlock(&data->wayland_surface->mutex); + if (has_client) return TRUE; + } Do we actually want to keep the wayland_surface, does the client need anything from it? Could we just keep the client surface with the window data instead? Eventually re-create it with a different top-level surface if needed when re-parenting?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6107#note_79061