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.
This commit is contained in:
Rémi Bernon 2023-05-29 13:52:16 +02:00 committed by Alexandre Julliard
parent 15dfe2ed2d
commit 8b5bdb10d5

View file

@ -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 */