Module: wine
Branch: master
Commit: 157d54021b92d9066d8f59b37759b4d7145a3ff9
URL: https://gitlab.winehq.org/wine/wine/-/commit/157d54021b92d9066d8f59b37759b4…
Author: Alexandros Frantzis <alexandros.frantzis(a)collabora.com>
Date: Thu Dec 7 16:15:14 2023 +0200
winewayland.drv: Apply surface configuration during Vulkan presentation.
When we have a Vulkan client subsurface, and depending on timings and
window state (e.g., fullscreen), we may not get the chance to apply new
surface configurations when presenting content to the main window
surface. To ensure new configurations are applied, also check for and
apply/ack configurations during Vulkan presentation.
This fixes some games which resize when they become fullscreen, but are
not properly placed by the compositor, because they never ack the
fullscreen state.
---
dlls/winewayland.drv/vulkan.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dlls/winewayland.drv/vulkan.c b/dlls/winewayland.drv/vulkan.c
index 86eb65afa46..294272a9788 100644
--- a/dlls/winewayland.drv/vulkan.c
+++ b/dlls/winewayland.drv/vulkan.c
@@ -270,6 +270,15 @@ static VkResult check_queue_present(const VkPresentInfoKHR *present_info,
wayland_surface_ensure_contents(wayland_surface);
+ /* Handle any processed configure request, to ensure the related
+ * surface state is applied by the compositor. */
+ if (wayland_surface->processing.serial &&
+ wayland_surface->processing.processed &&
+ wayland_surface_reconfigure(wayland_surface))
+ {
+ wl_surface_commit(wayland_surface->wl_surface);
+ }
+
pthread_mutex_unlock(&wayland_surface->mutex);
if (client_width == wine_vk_swapchain->extent.width &&