From 6a1e2c1b89f35050a19fc87ec1abe3ce362fb26c Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 21 Dec 2022 15:55:59 +0100 Subject: [PATCH] d3d9/tests: Fix some activation/focus test failures. By backporting the corresponding window management tweaks from the d3d8:device test. --- dlls/d3d9/tests/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 5c4417a2568..0a95e819018 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -4294,7 +4294,6 @@ static void test_wndproc(void) SetForegroundWindow(GetDesktopWindow()); ShowWindow(device_window, SW_MINIMIZE); - ShowWindow(device_window, SW_RESTORE); ShowWindow(focus_window, SW_MINIMIZE); ShowWindow(focus_window, SW_RESTORE); SetForegroundWindow(focus_window); @@ -4339,7 +4338,6 @@ static void test_wndproc(void) } filter_messages = NULL; SetForegroundWindow(focus_window); /* For KDE. */ - flush_events(); expect_messages = focus_loss_messages_filtered; windowposchanged_received = 0; @@ -4416,6 +4414,10 @@ static void test_wndproc(void) ref = IDirect3DDevice9_Release(device); ok(!ref, "Unexpected refcount %lu, i=%u.\n", ref, i); + ShowWindow(device_window, SW_RESTORE); + SetForegroundWindow(focus_window); + flush_events(); + filter_messages = focus_window; device_desc.device_window = device_window; if (!(device = create_device(d3d9, focus_window, &device_desc)))