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: Zhiyi Zhang zzhang@codeweavers.com --- dlls/user32/driver.c | 2 +- dlls/user32/sysparams.c | 2 +- dlls/user32/user_private.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c index 1c3b62eff2b..87c8cd621b3 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c @@ -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\{" ); diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 55d6d7e53a7..0b4dbfc2d78 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -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;
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index db082462f1b..974d18be482 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -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;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=90344
Your paranoid android.
=== debiant2 (32 bit Chinese:China report) ===
user32: input.c:2160: Test failed: GetRawInputBuffer returned 4 input.c:2155: Test failed: GetRawInputBuffer returned unexpected size: 0 input.c:2160: Test failed: GetRawInputBuffer returned 0 input.c:2161: Test failed: GetRawInputBuffer returned unexpected size: 0 input.c:2162: Test failed: Unexpected rawinput data: 0 input.c:2163: Test failed: Unexpected rawinput data: 0 input.c:2164: Test failed: Unexpected rawinput data: 0 input.c:2222: Test failed: GetRawInputData succeeded input.c:2223: Test failed: GetRawInputData returned deadbeef input.c:2336: Test failed: Spurious WM_INPUT messages input.c:2787: Test failed: 15: expected WM_INPUT message input.c:2790: Test failed: 15: expected RIM_INPUT message msg.c:14833: Test failed: bad time 9ebf9e
=== debiant2 (64 bit WoW report) ===
user32: input.c:2160: Test failed: GetRawInputBuffer returned 4 input.c:2155: Test failed: GetRawInputBuffer returned unexpected size: 0 input.c:2160: Test failed: GetRawInputBuffer returned 0 input.c:2161: Test failed: GetRawInputBuffer returned unexpected size: 0 input.c:2162: Test failed: Unexpected rawinput data: 0 input.c:2163: Test failed: Unexpected rawinput data: 0 input.c:2164: Test failed: Unexpected rawinput data: 0 input.c:2222: Test failed: GetRawInputData succeeded input.c:2223: Test failed: GetRawInputData returned deadbeef input.c:2336: Test failed: Spurious WM_INPUT messages