On Thu Jul 9 07:15:02 2026 +0000, Rémi Bernon wrote:
So I understand that keeping the wl_surface alive is enough? I also understand from this MR that a wl_surface may be reused for a different Vulkan surface & swapchain it was using initially, so it's not an issue if we reuse the wrong one, but it's important we keep them alive. So, would something like https://gitlab.winehq.org/wine/wine/-/merge_requests/11351 be enough? (Fwiw this version discards any unused surface whenever SetWindowPos is called though we could keep them around longer, eventually even resizing them but I am afraid of it causing surfaces staying unused but alive unnecessarily) Yes, keeping the wl_surface alive is enough, and assigning the wl_surface to a different VkSurface (of a different HWND) is fine too. I like the approach in !11351, but maybe it would be better to clear out all the unused client surfaces inside destroy_window like how it is done with win->unused_drawable, since the app can call SetWindowPos whenever it wants.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11342#note_145252