Module: wine Branch: master Commit: 8b5bdb10d586d069e3ed5bc5138015f742a9183b URL: https://gitlab.winehq.org/wine/wine/-/commit/8b5bdb10d586d069e3ed5bc5138015f...
Author: Rémi Bernon rbernon@codeweavers.com Date: Mon May 29 13:52:16 2023 +0200
win32u: Call SetDesktopWindow when desktop window is successfully created.
When the default desktop window is created, its parent is always NULL, and SetDesktopWindow is never called here.
---
dlls/win32u/window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 599a0b7300e..e1cd80f8a36 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -4950,10 +4950,10 @@ static WND *create_window_handle( HWND parent, HWND owner, UNICODE_STRING *name,
if (name->Buffer == (const WCHAR *)DESKTOP_CLASS_ATOM) { - if (!thread_info->top_window) - thread_info->top_window = HandleToUlong( full_parent ? full_parent : handle ); + if (!thread_info->top_window) thread_info->top_window = HandleToUlong( full_parent ? full_parent : handle ); else assert( full_parent == UlongToHandle( thread_info->top_window )); - if (full_parent) user_driver->pSetDesktopWindow( UlongToHandle( thread_info->top_window )); + if (!thread_info->top_window) ERR_(win)( "failed to create desktop window\n" ); + else user_driver->pSetDesktopWindow( UlongToHandle( thread_info->top_window )); register_builtin_classes(); } else /* HWND_MESSAGE parent */