From: Paul Gofman pgofman@codeweavers.com
--- dlls/win32u/ntuser_private.h | 1 + dlls/win32u/vulkan.c | 12 ++++++++++++ dlls/win32u/window.c | 14 ++++++++++++++ 3 files changed, 27 insertions(+)
diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h index 2f3bbdf91c0..0d5f4430324 100644 --- a/dlls/win32u/ntuser_private.h +++ b/dlls/win32u/ntuser_private.h @@ -228,6 +228,7 @@ extern PFN_vkGetInstanceProcAddr p_vkGetInstanceProcAddr;
extern BOOL vulkan_init(void); extern void vulkan_detach_surfaces( struct list *surfaces ); +extern void vulkan_update_surfaces( struct list *surfaces );
/* window.c */ HANDLE alloc_user_handle( struct user_object *ptr, unsigned int type ); diff --git a/dlls/win32u/vulkan.c b/dlls/win32u/vulkan.c index c676ae10e54..77e3015199d 100644 --- a/dlls/win32u/vulkan.c +++ b/dlls/win32u/vulkan.c @@ -705,12 +705,24 @@ void vulkan_detach_surfaces( struct list *surfaces ) } }
+void vulkan_update_surfaces( struct list *surfaces ) +{ + struct surface *surface; + + LIST_FOR_EACH_ENTRY( surface, surfaces, struct surface, entry ) + driver_funcs->p_vulkan_surface_update( surface->hwnd, surface->driver_private ); +} + #else /* SONAME_LIBVULKAN */
void vulkan_detach_surfaces( struct list *surfaces ) { }
+void vulkan_update_surfaces( struct list *surfaces ) +{ +} + static void vulkan_init_once(void) { ERR( "Wine was built without Vulkan support.\n" ); diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 4855555d926..59d0c4b7cb1 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -477,6 +477,20 @@ HWND WINAPI NtUserSetParent( HWND hwnd, HWND parent ) if (was_visible) NtUserShowWindow( hwnd, SW_SHOW );
set_thread_dpi_awareness_context( context ); + + win = get_win_ptr( hwnd ); + if (win && win != WND_OTHER_PROCESS && win != WND_DESKTOP) + { + vulkan_update_surfaces( &win->vulkan_surfaces ); + release_win_ptr( win ); + } + win = get_win_ptr( parent ); + if (win && win != WND_OTHER_PROCESS && win != WND_DESKTOP) + { + vulkan_update_surfaces( &win->vulkan_surfaces ); + release_win_ptr( win ); + } + return old_parent; }