Commit ce72f9b4 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

user32: Use wait_graphics_driver_ready() in load_desktop_driver().

So that Wine doesn't have to send an extra WM_NULL message when wait_graphics_driver_ready() is later called in EnumDisplayDevicesW(). Also, it avoids a deadlock when wait_graphics_driver_ready() is used in later patches. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 087aefdc
......@@ -55,7 +55,7 @@ static BOOL load_desktop_driver( HWND hwnd, HMODULE *module )
USER_CheckNotLock();
strcpy( driver_load_error, "The explorer process failed to start." ); /* default error */
SendMessageW( hwnd, WM_NULL, 0, 0 ); /* wait for the desktop process to be ready */
wait_graphics_driver_ready();
guid_atom = HandleToULong( GetPropW( hwnd, L"__wine_display_device_guid" ));
lstrcpyW( key, L"System\\CurrentControlSet\\Control\\Video\\{" );
......
......@@ -583,7 +583,7 @@ static void release_display_device_init_mutex( HANDLE mutex )
}
/* Wait until graphics driver is loaded by explorer */
static void wait_graphics_driver_ready(void)
void wait_graphics_driver_ready(void)
{
static BOOL ready = FALSE;
......
......@@ -258,6 +258,7 @@ extern void move_window_bits( HWND hwnd, struct window_surface *old_surface,
extern void move_window_bits_parent( HWND hwnd, HWND parent, const RECT *window_rect,
const RECT *valid_rects ) DECLSPEC_HIDDEN;
extern void update_window_state( HWND hwnd ) DECLSPEC_HIDDEN;
extern void wait_graphics_driver_ready(void) DECLSPEC_HIDDEN;
extern void *get_hook_proc( void *proc, const WCHAR *module, HMODULE *free_module ) DECLSPEC_HIDDEN;
extern RECT get_virtual_screen_rect(void) DECLSPEC_HIDDEN;
extern LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment