From: Stefan Dösinger stefan@codeweavers.com
d3d8 is not affected in this way because it does not call flush_events() between focus loss and re-gain. --- dlls/d3d9/tests/device.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 0d38f68bf3f..27bc82b8933 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -4228,6 +4228,24 @@ static void test_wndproc(void) } flush_events();
+ if (!(tests[i].create_flags & CREATE_DEVICE_NOWINDOWCHANGES)) + { + /* The window manager on Gitlab CI (FVWM2) insists on restoring the device window for some + * reason. In this case we might not receive WM_WINDOWPOSCHANGING on the device window + * because nothing is being changed on focus gain. Manually minimizing it again seems to + * resolve this. + * + * Wine's internal status is being updated while processing messages (the flush_events above). */ + ret = IsIconic(device_window); + todo_wine_if (!ret) + ok(ret, "Expected the device window to still be iconic.\n"); + if (!ret) + ShowWindow(device_window, SW_MINIMIZE); + flush_events(); + ret = IsIconic(device_window); + ok(ret, "Device window refuses to minimize.\n"); + } + /* I have to minimize and restore the focus window, otherwise native d3d9 fails * device::reset with D3DERR_DEVICELOST. This does not happen when the window * restore is triggered by the user. */