From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- This supersedes patch 188408.
dlls/d3d9/tests/device.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 41cfc1519c1..a15c04fa455 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -4939,12 +4939,14 @@ static void test_window_style(void) static const struct { DWORD device_flags; - LONG style, focus_loss_style, exstyle; + LONG create_style, style, focus_loss_style, exstyle, focus_loss_exstyle; } tests[] = { - {0, WS_VISIBLE, WS_MINIMIZE, WS_EX_TOPMOST}, - {CREATE_DEVICE_NOWINDOWCHANGES, 0, 0, 0}, + {0, 0, WS_VISIBLE, WS_MINIMIZE, WS_EX_TOPMOST, WS_EX_TOPMOST}, + {0, WS_VISIBLE, WS_VISIBLE, WS_MINIMIZE, 0, WS_EX_TOPMOST}, + {CREATE_DEVICE_NOWINDOWCHANGES, 0, 0, 0, 0, 0}, + {CREATE_DEVICE_NOWINDOWCHANGES, WS_VISIBLE, WS_VISIBLE, 0, 0, 0}, }; unsigned int i;
@@ -4954,9 +4956,9 @@ static void test_window_style(void)
for (i = 0; i < ARRAY_SIZE(tests); ++i) { - focus_window = CreateWindowA("d3d9_test_wc", "d3d9_test", WS_OVERLAPPEDWINDOW, + focus_window = CreateWindowA("d3d9_test_wc", "d3d9_test", WS_OVERLAPPEDWINDOW | tests[i].create_style, 0, 0, registry_mode.dmPelsWidth / 2, registry_mode.dmPelsHeight / 2, 0, 0, 0, 0); - device_window = CreateWindowA("d3d9_test_wc", "d3d9_test", WS_OVERLAPPEDWINDOW, + device_window = CreateWindowA("d3d9_test_wc", "d3d9_test", WS_OVERLAPPEDWINDOW | tests[i].create_style, 0, 0, registry_mode.dmPelsWidth / 2, registry_mode.dmPelsHeight / 2, 0, 0, 0, 0);
device_style = GetWindowLongA(device_window, GWL_STYLE); @@ -5018,12 +5020,12 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | tests[i].style; - todo_wine_if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) + todo_wine_if ((tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) && !(tests[i].create_style & WS_VISIBLE)) ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle | tests[i].exstyle; - todo_wine_if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) + todo_wine_if ((tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) || (tests[i].create_style & WS_VISIBLE)) ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", expected_style, style, i);
@@ -5045,7 +5047,7 @@ static void test_window_style(void) todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); - expected_style = device_exstyle | tests[i].exstyle; + expected_style = device_exstyle | tests[i].focus_loss_exstyle | tests[i].exstyle; todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", expected_style, style, i);
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=74968
Your paranoid android.
=== w1064v1809_2scr (32 bit report) ===
d3d9: device.c:5043: Test failed: Failed to set foreground window. device.c:5047: Test failed: Expected device window style 0x34cf0000, got 0x14000000, i=1. device.c:5051: Test failed: Expected device window extended style 0x108, got 0, i=1. device.c:5067: Test failed: Failed to set foreground window. device.c:5043: Test failed: Failed to set foreground window. device.c:5067: Test failed: Failed to set foreground window. device.c:5070: Test failed: Failed to reset device, hr 0x88760868. device.c:5043: Test failed: Failed to set foreground window. device.c:5067: Test failed: Failed to set foreground window. device.c:11438: Test failed: Failed to set foreground window. device.c:11440: Test failed: Got unexpected hr 0. device.c:11442: Test failed: Got unexpected hr 0. device.c:11447: Test failed: Failed to set foreground window. device.c:11449: Test failed: Got unexpected hr 0. device.c:11451: Test failed: Got unexpected hr 0. device.c:11469: Test failed: Failed to set foreground window. device.c:11478: Test failed: Failed to set foreground window. device.c:11493: Test failed: Failed to set foreground window. device.c:11495: Test failed: Got unexpected hr 0. device.c:11499: Test failed: Failed to set foreground window.
=== w1064v1809 (64 bit report) ===
d3d9: device.c:5043: Test failed: Failed to set foreground window. device.c:5047: Test failed: Expected device window style 0x34cf0000, got 0x14000000, i=1. device.c:5051: Test failed: Expected device window extended style 0x108, got 0, i=1. device.c:5067: Test failed: Failed to set foreground window. device.c:5043: Test failed: Failed to set foreground window. device.c:5067: Test failed: Failed to set foreground window. device.c:5070: Test failed: Failed to reset device, hr 0x88760868. device.c:5043: Test failed: Failed to set foreground window. device.c:5067: Test failed: Failed to set foreground window. device.c:11438: Test failed: Failed to set foreground window. device.c:11440: Test failed: Got unexpected hr 0. device.c:11442: Test failed: Got unexpected hr 0. device.c:11447: Test failed: Failed to set foreground window. device.c:11449: Test failed: Got unexpected hr 0. device.c:11451: Test failed: Got unexpected hr 0. device.c:11469: Test failed: Failed to set foreground window. device.c:11478: Test failed: Failed to set foreground window. device.c:11493: Test failed: Failed to set foreground window. device.c:11495: Test failed: Got unexpected hr 0. device.c:11499: Test failed: Failed to set foreground window. device.c:14087: Test failed: Adapter 0: SetForegroundWindow failed, error 0. device.c:14093: Test failed: Adapter 0: SetForegroundWindow failed, error 0.
=== debiant (32 bit report) ===
d3d9: device: Timeout
=== debiant (build log) ===
0024:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 0024:err:winediag:nodrv_CreateWindow The explorer process failed to start. Task: WineTest did not produce the win32_fr_FR report
=== debiant (32 bit WoW report) ===
d3d9: device: Timeout
=== debiant (build log) ===
0024:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 0024:err:winediag:nodrv_CreateWindow The explorer process failed to start. Task: WineTest did not produce the wow64 report