Module: wine Branch: master Commit: 1c31bdcad70ee89b2d0edd85b9ea827d3dc0995b URL: https://gitlab.winehq.org/wine/wine/-/commit/1c31bdcad70ee89b2d0edd85b9ea827...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Sep 26 18:42:10 2022 +0200
user32/tests: Flush window events to fix some race conditions.
---
dlls/user32/tests/win.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 5f2e11ce367..b86a9b05e61 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -8143,9 +8143,11 @@ static void test_EnableWindow(void) DWORD tid; MSG msg;
- hwnd = CreateWindowExA(0, "MainWindowClass", NULL, WS_OVERLAPPEDWINDOW, - 0, 0, 100, 100, 0, 0, 0, NULL); + hwnd = CreateWindowExA(0, "MainWindowClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), + 0, 0, 0, NULL); assert(hwnd); + flush_events( TRUE ); ok(IsWindowEnabled(hwnd), "window should be enabled\n"); SetFocus(hwnd); SetCapture(hwnd); @@ -8658,6 +8660,7 @@ static void run_NCRedrawLoop(UINT flags)
UINT loopcount = 0;
+ flush_events( TRUE ); hwnd = CreateWindowA("TestNCRedrawClass", "MainWindow", WS_OVERLAPPEDWINDOW, 0, 0, 200, 100, NULL, NULL, 0, &flags);