user32: Only wait for the desktop process when necessary.

This commit is contained in:
Alexandre Julliard 2014-01-30 21:49:32 +01:00
parent 82b38139eb
commit b4b817b907
2 changed files with 7 additions and 3 deletions

View File

@ -57,8 +57,15 @@ static HMODULE load_desktop_driver( HWND hwnd )
WCHAR key[(sizeof(key_pathW) + sizeof(displayW)) / sizeof(WCHAR) + 40];
UINT guid_atom = HandleToULong( GetPropW( hwnd, display_device_guid_propW ));
USER_CheckNotLock();
strcpy( driver_load_error, "The explorer process failed to start." ); /* default error */
if (!guid_atom)
{
SendMessageW( hwnd, WM_NULL, 0, 0 ); /* wait for the desktop process to be ready */
guid_atom = HandleToULong( GetPropW( hwnd, display_device_guid_propW ));
}
memcpy( key, key_pathW, sizeof(key_pathW) );
if (!GlobalGetAtomNameW( guid_atom, key + strlenW(key), 40 )) return 0;
strcatW( key, displayW );

View File

@ -2086,9 +2086,6 @@ HWND WINAPI GetDesktopWindow(void)
SERVER_END_REQ;
}
/* wait for the desktop process to be ready */
SendMessageW( thread_info->top_window, WM_NULL, 0, 0 );
if (!thread_info->top_window || !USER_Driver->pCreateDesktopWindow( thread_info->top_window ))
ERR( "failed to create desktop window\n" );