[PATCH] d3d8/tests: Flush events after sending SC_MAXIMIZE.

Zebediah Figura z.figura12 at gmail.com
Fri Nov 1 10:52:03 CDT 2019


For some reason, on fvwm2 sometimes focus_window will be restored and activated
between the subsequent call to SetForegroundWindow() and the next call to
ShowWindow(SW_RESTORE), causing the next test to fail. Flushing first seems to
reliably work around this.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
I don't know why this occurs. The messages sent suggest that a WM_STATE is
received from fvwm2, and this triggers handle_wm_state_notify() to call
SetActiveWindow() and send SC_RESTORE. But it's not clear why WM_STATE would be
sent at that point. I can't reproduce the problem on my end more than once in a
large number of times, so debugging is rather difficult.

 dlls/d3d8/tests/device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index 819c1cd944..9fc06c3c9d 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -3151,6 +3151,7 @@ static void test_wndproc(void)
     ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it.\n",
             expect_messages->message, expect_messages->window);
     expect_messages = NULL;
+    flush_events();
     SetForegroundWindow(GetDesktopWindow());
     flush_events();
 
-- 
2.23.0




More information about the wine-devel mailing list