From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/dxgi/tests/dxgi.c | 80 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 9 deletions(-)
diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index 8f52e1d..6ff9dbe 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -340,6 +340,8 @@ static BOOL output_belongs_to_adapter(IDXGIOutput *output, IDXGIAdapter *adapter
struct fullscreen_state { + DWORD style; + DWORD exstyle; RECT window_rect; RECT client_rect; HMONITOR monitor; @@ -359,6 +361,9 @@ static void capture_fullscreen_state_(unsigned int line, struct fullscreen_state MONITORINFOEXW monitor_info; BOOL ret;
+ state->style = GetWindowLongA(window, GWL_STYLE); + state->exstyle = GetWindowLongA(window, GWL_EXSTYLE); + ret = GetWindowRect(window, &state->window_rect); ok_(__FILE__, line)(ret, "GetWindowRect failed.\n"); ret = GetClientRect(window, &state->client_rect); @@ -375,8 +380,13 @@ static void capture_fullscreen_state_(unsigned int line, struct fullscreen_state
#define check_fullscreen_state(a, b) check_fullscreen_state_(__LINE__, a, b) static void check_fullscreen_state_(unsigned int line, const struct fullscreen_state *state, - const struct fullscreen_state *expected_state) + const struct fullscreen_state *expected_state, BOOL windowed) { + todo_wine_if(!windowed) + ok_(__FILE__, line)((state->style & ~WS_VISIBLE) == (expected_state->style & ~WS_VISIBLE), + "Got style %x, expected %x.\n", (DWORD)(state->style & ~WS_VISIBLE), (DWORD)(expected_state->style & ~WS_VISIBLE)); + ok_(__FILE__, line)((state->exstyle & ~WS_EX_TOPMOST) == (expected_state->exstyle & ~WS_EX_TOPMOST), + "Got exstyle %x, expected %x.\n", (DWORD)(state->exstyle & ~WS_EX_TOPMOST), (DWORD)(expected_state->exstyle & ~WS_EX_TOPMOST)); ok_(__FILE__, line)(EqualRect(&state->window_rect, &expected_state->window_rect), "Got window rect %s, expected %s.\n", wine_dbgstr_rect(&state->window_rect), wine_dbgstr_rect(&expected_state->window_rect)); @@ -391,13 +401,13 @@ static void check_fullscreen_state_(unsigned int line, const struct fullscreen_s wine_dbgstr_rect(&state->monitor_rect), wine_dbgstr_rect(&expected_state->monitor_rect)); }
-#define check_window_fullscreen_state(a, b) check_window_fullscreen_state_(__LINE__, a, b) +#define check_window_fullscreen_state(a, b) check_window_fullscreen_state_(__LINE__, a, b, TRUE) static void check_window_fullscreen_state_(unsigned int line, HWND window, - const struct fullscreen_state *expected_state) + const struct fullscreen_state *expected_state, BOOL windowed) { struct fullscreen_state current_state; capture_fullscreen_state_(line, ¤t_state, window); - check_fullscreen_state_(line, ¤t_state, expected_state); + check_fullscreen_state_(line, ¤t_state, expected_state, windowed); }
#define check_swapchain_fullscreen_state(a, b) check_swapchain_fullscreen_state_(__LINE__, a, b) @@ -411,7 +421,8 @@ static void check_swapchain_fullscreen_state_(unsigned int line, IDXGISwapChain
hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); ok_(__FILE__, line)(hr == S_OK, "Failed to get swapchain desc, hr %#x.\n", hr); - check_window_fullscreen_state_(line, swapchain_desc.OutputWindow, &expected_state->fullscreen_state); + check_window_fullscreen_state_(line, swapchain_desc.OutputWindow, &expected_state->fullscreen_state, + swapchain_desc.Windowed);
ok_(__FILE__, line)(swapchain_desc.Windowed == !expected_state->fullscreen, "Got windowed %#x, expected %#x.\n", @@ -476,6 +487,9 @@ static void compute_expected_swapchain_fullscreen_state_after_fullscreen_change_ new_height = mode_desc.Height; }
+ state->fullscreen_state.style &= WS_VISIBLE | WS_CLIPSIBLINGS; + state->fullscreen_state.exstyle &= WS_EX_TOPMOST; + state->fullscreen = TRUE; if (swapchain_desc->Flags & DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH) { @@ -1947,6 +1961,7 @@ static void test_create_swapchain(void) creation_desc.OutputWindow = CreateWindowA("static", "dxgi_test", WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, 0, 0, 222, 222, 0, 0, 0, 0); + expected_state.fullscreen_state.style = WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX; SetRect(&expected_state.fullscreen_state.window_rect, 0, 0, 222, 222); GetClientRect(creation_desc.OutputWindow, expected_client_rect); expected_width = expected_client_rect->right; @@ -1969,6 +1984,8 @@ static void test_create_swapchain(void) creation_desc.OutputWindow = CreateWindowA("static", "dxgi_test", WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 1, 1, 0, 0, 0, 0, 0, 0); + expected_state.fullscreen_state.style = WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; + expected_state.fullscreen_state.exstyle = 0; SetRect(&expected_state.fullscreen_state.window_rect, 1, 1, 1, 1); SetRectEmpty(expected_client_rect); expected_width = expected_height = 8; @@ -5772,12 +5789,22 @@ static void test_swapchain_window_styles(void) WS_EX_WINDOWEDGE}, {WS_OVERLAPPED | WS_VISIBLE, 0, WS_OVERLAPPED | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION, WS_EX_WINDOWEDGE}, + {WS_OVERLAPPED | WS_MAXIMIZE, 0, + WS_OVERLAPPED | WS_MAXIMIZE | WS_CLIPSIBLINGS | WS_CAPTION, WS_EX_WINDOWEDGE}, + {WS_OVERLAPPED | WS_MINIMIZE, 0, + WS_OVERLAPPED | WS_MINIMIZE | WS_CLIPSIBLINGS | WS_CAPTION, WS_EX_WINDOWEDGE}, {WS_CAPTION | WS_DISABLED, WS_EX_TOPMOST, WS_CAPTION | WS_DISABLED | WS_CLIPSIBLINGS, WS_EX_TOPMOST | WS_EX_WINDOWEDGE}, {WS_CAPTION | WS_DISABLED | WS_VISIBLE, WS_EX_TOPMOST, WS_CAPTION | WS_DISABLED | WS_VISIBLE | WS_CLIPSIBLINGS, WS_EX_TOPMOST | WS_EX_WINDOWEDGE}, {WS_CAPTION | WS_SYSMENU | WS_VISIBLE, WS_EX_APPWINDOW, WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_CLIPSIBLINGS, WS_EX_APPWINDOW | WS_EX_WINDOWEDGE}, + {WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_BORDER | WS_DLGFRAME | + WS_VSCROLL | WS_HSCROLL | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, + 0, + WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_BORDER | WS_DLGFRAME | + WS_VSCROLL | WS_HSCROLL | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, + WS_EX_WINDOWEDGE}, };
if (!(device = create_device(0))) @@ -5819,8 +5846,9 @@ static void test_swapchain_window_styles(void) ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", i, exstyle, tests[i].expected_exstyle);
- fullscreen_style = tests[i].expected_style & (WS_VISIBLE | WS_DISABLED | WS_CLIPSIBLINGS); - fullscreen_exstyle = (tests[i].expected_exstyle & WS_EX_APPWINDOW) | WS_EX_TOPMOST; + fullscreen_style = tests[i].expected_style & ~(WS_POPUP | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_THICKFRAME | WS_SYSMENU | WS_DLGFRAME | WS_BORDER); + fullscreen_exstyle = tests[i].expected_exstyle & ~(WS_EX_DLGMODALFRAME | WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP); + fullscreen_exstyle |= WS_EX_TOPMOST;
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); ok(hr == S_OK, "Failed to create swapchain, hr %#x.\n", hr); @@ -5863,15 +5891,49 @@ static void test_swapchain_window_styles(void) ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", i, exstyle, tests[i].expected_exstyle);
+ hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL); + ok(hr == S_OK || hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE + || broken(hr == DXGI_ERROR_UNSUPPORTED), /* Win 7 testbot */ + "Failed to set fullscreen state, hr %#x.\n", hr); + if (SUCCEEDED(hr)) + { + style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); + exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); + todo_wine + ok(style == fullscreen_style, "Test %u: Got style %#x, expected %#x.\n", + i, style, fullscreen_style); + ok(exstyle == fullscreen_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", + i, exstyle, fullscreen_exstyle); + + SetWindowLongW(swapchain_desc.OutputWindow, GWL_STYLE, fullscreen_style); + SetWindowLongW(swapchain_desc.OutputWindow, GWL_EXSTYLE, fullscreen_exstyle); + + hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + + style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); + exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); + todo_wine + ok(style == tests[i].expected_style, "Test %u: Got style %#x, expected %#x.\n", + i, style, tests[i].expected_style); + todo_wine + ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", + i, exstyle, tests[i].expected_exstyle); + } + else + { + skip("Test %u: Could not change fullscreen state.\n", i); + } + refcount = IDXGISwapChain_Release(swapchain); ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount);
style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); - todo_wine_if(!(tests[i].expected_style & WS_VISIBLE)) + todo_wine ok(style == tests[i].expected_style, "Test %u: Got style %#x, expected %#x.\n", i, style, tests[i].expected_style); - todo_wine_if(!(tests[i].expected_exstyle & WS_EX_TOPMOST)) + todo_wine ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", i, exstyle, tests[i].expected_exstyle);
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/d3d9/tests/d3d9ex.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index dab5cf6..f475d55 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -3559,6 +3559,14 @@ static void test_window_style(void) hr = reset_device(device, &device_desc); ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr);
+ GetWindowRect(device_window, &r); + if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) + todo_wine ok(EqualRect(&r, &device_rect), "Expected %s, got %s, i=%u.\n", + wine_dbgstr_rect(&device_rect), wine_dbgstr_rect(&r), i); + else + ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s, i=%u.\n", + wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r), i); + style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style; todo_wine_if (!(tests[i].style_flags & WS_VISIBLE))
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=74866
Your paranoid android.
=== debiant (32 bit report) ===
d3d9: d3d9ex: 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: d3d9ex: 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
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/d3d9/tests/device.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 41cfc15..9f6a677 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,11 +5020,11 @@ 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].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; + expected_style = device_exstyle | tests[i].focus_loss_exstyle | tests[i].exstyle; todo_wine_if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) 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=74867
Your paranoid android.
=== w8 (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w8adm (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1507 (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809 (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_2scr (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_ar (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_he (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_ja (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_zh_CN (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w864 (64 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1507 (64 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809 (64 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== 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
For some reason, it looks like the behavior is swapped for Win8 and above. Should I use broken() or what's the best way to handle this?
On 06/07/2020 18:39, Marvin wrote:
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=74867
Your paranoid android.
=== w8 (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w8adm (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1507 (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809 (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_2scr (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_ar (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_he (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_ja (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_zh_CN (32 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w864 (64 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1507 (64 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809 (64 bit report) ===
d3d9: device.c:5029: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5051: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== 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
Based on a patch by Rémi Bernon.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/d3d9/tests/d3d9ex.c | 6 ++++-- dlls/d3d9/tests/device.c | 5 ++--- dlls/wined3d/swapchain.c | 10 ++++++++-- include/wine/wined3d.h | 1 + 4 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index f475d55..76565c4 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -3574,7 +3574,8 @@ static void test_window_style(void) expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle; - todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", + todo_wine_if (!(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)) + ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", expected_style, style, i);
style = GetWindowLongA(focus_window, GWL_STYLE); @@ -3594,7 +3595,8 @@ static void test_window_style(void) expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle; - todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", + todo_wine_if (!(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)) + ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", expected_style, style, i);
style = GetWindowLongA(focus_window, GWL_STYLE); diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 9f6a677..6f10a6c 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -5025,9 +5025,8 @@ static void test_window_style(void) expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle | tests[i].focus_loss_exstyle | tests[i].exstyle; - todo_wine_if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) - ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", - expected_style, style, i); + ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", + expected_style, style, i);
style = GetWindowLongA(focus_window, GWL_STYLE); ok(style == focus_style, "Expected focus window style %#x, got %#x, i=%u.\n", diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index e9d6272..4c380e0 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -1349,6 +1349,9 @@ static HRESULT wined3d_swapchain_init(struct wined3d_swapchain *swapchain, struc && desc->swap_effect != WINED3D_SWAP_EFFECT_COPY) FIXME("Unimplemented swap effect %#x.\n", desc->swap_effect);
+ if (device->create_parms.flags & WINED3DCREATE_NOWINDOWCHANGES) + desc->flags |= WINED3D_SWAPCHAIN_NO_ZORDER_CHANGES; + window = desc->device_window ? desc->device_window : device->create_parms.focus_window; if (FAILED(hr = wined3d_swapchain_state_init(&swapchain->state, desc, window))) { @@ -2065,6 +2068,7 @@ static LONG fullscreen_exstyle(LONG exstyle) HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state *state, HWND window, int x, int y, int width, int height) { + unsigned int window_pos_flags = SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOACTIVATE; LONG style, exstyle; BOOL filter;
@@ -2082,6 +2086,9 @@ HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state window, state->style, state->exstyle); }
+ if (state->desc.flags & WINED3D_SWAPCHAIN_NO_ZORDER_CHANGES) + window_pos_flags |= SWP_NOZORDER; + state->style = GetWindowLongW(window, GWL_STYLE); state->exstyle = GetWindowLongW(window, GWL_EXSTYLE);
@@ -2095,8 +2102,7 @@ HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state
SetWindowLongW(window, GWL_STYLE, style); SetWindowLongW(window, GWL_EXSTYLE, exstyle); - SetWindowPos(window, HWND_TOPMOST, x, y, width, height, - SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOACTIVATE); + SetWindowPos(window, HWND_TOPMOST, x, y, width, height, window_pos_flags);
wined3d_filter_messages(window, filter);
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 346d1d0..ba14e4b 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -905,6 +905,7 @@ enum wined3d_shader_type #define WINED3D_SWAPCHAIN_GDI_COMPATIBLE 0x00008000u #define WINED3D_SWAPCHAIN_IMPLICIT 0x00010000u #define WINED3D_SWAPCHAIN_HOOK 0x00020000u +#define WINED3D_SWAPCHAIN_NO_ZORDER_CHANGES 0x00040000u
#define WINED3DDP_MAXTEXCOORD 8
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=74868
Your paranoid android.
=== w8 (32 bit report) ===
d3d9: device.c:5028: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5050: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w8adm (32 bit report) ===
d3d9: device.c:5028: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5050: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1507 (32 bit report) ===
d3d9: device.c:5028: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5050: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809 (32 bit report) ===
d3d9: device.c:5028: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5050: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_2scr (32 bit report) ===
d3d9: device.c:5028: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5050: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_ar (32 bit report) ===
d3d9: device.c:5028: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5050: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_he (32 bit report) ===
d3d9: device.c:5028: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5050: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_ja (32 bit report) ===
d3d9: device.c:5028: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5050: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_zh_CN (32 bit report) ===
d3d9: device.c:5028: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5050: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w864 (64 bit report) ===
d3d9: device.c:5028: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5050: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1507 (64 bit report) ===
d3d9: device.c:5028: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5050: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809 (64 bit report) ===
d3d9: device.c:5028: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5050: Test failed: Expected device window extended style 0x100, got 0x108, i=1. device.c:5042: Test failed: Failed to set foreground window. device.c:5066: Test failed: Failed to set foreground window. device.c:5069: Test failed: Failed to reset device, hr 0x88760868. device.c:5042: Test failed: Failed to set foreground window. device.c:5066: Test failed: Failed to set foreground window. device.c:11437: Test failed: Failed to set foreground window. device.c:11439: Test failed: Got unexpected hr 0. device.c:11441: Test failed: Got unexpected hr 0. device.c:11446: Test failed: Failed to set foreground window. device.c:11448: Test failed: Got unexpected hr 0. device.c:11450: Test failed: Got unexpected hr 0. device.c:11468: Test failed: Failed to set foreground window. device.c:11477: Test failed: Failed to set foreground window. device.c:11492: Test failed: Failed to set foreground window. device.c:11494: Test failed: Got unexpected hr 0. device.c:11498: Test failed: Failed to set foreground window. device.c:14086: Test failed: Adapter 0: SetForegroundWindow failed, error 0. device.c:14092: Test failed: Adapter 0: SetForegroundWindow failed, error 0.
=== debiant (32 bit report) ===
d3d9: d3d9ex: Timeout 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: d3d9ex: Timeout 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
Based on a patch by Rémi Bernon.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/d3d9/tests/d3d9ex.c | 4 ++-- dlls/d3d9/tests/device.c | 5 ++--- dlls/wined3d/swapchain.c | 7 +++++-- include/wine/wined3d.h | 1 + 4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 76565c4..2836fdd 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -3569,7 +3569,7 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style; - todo_wine_if (!(tests[i].style_flags & WS_VISIBLE)) + todo_wine_if (!(tests[i].style_flags & WS_VISIBLE) && !(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)) ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); @@ -3590,7 +3590,7 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style; - todo_wine_if (!(tests[i].style_flags & WS_VISIBLE)) + todo_wine_if (!(tests[i].style_flags & WS_VISIBLE) && !(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)) ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 6f10a6c..f2b420c 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -5020,9 +5020,8 @@ 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) && !(tests[i].style & WS_VISIBLE)) - ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", - expected_style, style, i); + 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].focus_loss_exstyle | tests[i].exstyle; ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 4c380e0..8ded2cb 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -1350,7 +1350,7 @@ static HRESULT wined3d_swapchain_init(struct wined3d_swapchain *swapchain, struc FIXME("Unimplemented swap effect %#x.\n", desc->swap_effect);
if (device->create_parms.flags & WINED3DCREATE_NOWINDOWCHANGES) - desc->flags |= WINED3D_SWAPCHAIN_NO_ZORDER_CHANGES; + desc->flags |= WINED3D_SWAPCHAIN_NO_VISIBILITY_CHANGES | WINED3D_SWAPCHAIN_NO_ZORDER_CHANGES;
window = desc->device_window ? desc->device_window : device->create_parms.focus_window; if (FAILED(hr = wined3d_swapchain_state_init(&swapchain->state, desc, window))) @@ -2068,7 +2068,7 @@ static LONG fullscreen_exstyle(LONG exstyle) HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state *state, HWND window, int x, int y, int width, int height) { - unsigned int window_pos_flags = SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOACTIVATE; + unsigned int window_pos_flags = SWP_FRAMECHANGED | SWP_NOACTIVATE; LONG style, exstyle; BOOL filter;
@@ -2086,6 +2086,9 @@ HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state window, state->style, state->exstyle); }
+ if (!(state->desc.flags & WINED3D_SWAPCHAIN_NO_VISIBILITY_CHANGES)) + window_pos_flags |= SWP_SHOWWINDOW; + if (state->desc.flags & WINED3D_SWAPCHAIN_NO_ZORDER_CHANGES) window_pos_flags |= SWP_NOZORDER;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index ba14e4b..726c715 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -906,6 +906,7 @@ enum wined3d_shader_type #define WINED3D_SWAPCHAIN_IMPLICIT 0x00010000u #define WINED3D_SWAPCHAIN_HOOK 0x00020000u #define WINED3D_SWAPCHAIN_NO_ZORDER_CHANGES 0x00040000u +#define WINED3D_SWAPCHAIN_NO_VISIBILITY_CHANGES 0x00080000u
#define WINED3DDP_MAXTEXCOORD 8
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=74869
Your paranoid android.
=== w8 (32 bit report) ===
d3d9: device.c:5027: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5049: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w8adm (32 bit report) ===
d3d9: device.c:5027: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5049: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1507 (32 bit report) ===
d3d9: device.c:5027: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5049: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809 (32 bit report) ===
d3d9: device.c:5027: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5049: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_2scr (32 bit report) ===
d3d9: device.c:5027: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5049: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_ar (32 bit report) ===
d3d9: device.c:5027: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5049: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_he (32 bit report) ===
d3d9: device.c:5027: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5049: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_ja (32 bit report) ===
d3d9: device.c:5027: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5049: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809_zh_CN (32 bit report) ===
d3d9: device.c:5027: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5049: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w864 (64 bit report) ===
d3d9: device.c:5027: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5049: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1507 (64 bit report) ===
d3d9: device.c:5027: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5049: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== w1064v1809 (64 bit report) ===
d3d9: device.c:5027: Test failed: Expected device window extended style 0x108, got 0x100, i=1. device.c:5049: Test failed: Expected device window extended style 0x100, got 0x108, i=1.
=== debiant (32 bit report) ===
d3d9: d3d9ex: Timeout 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: d3d9ex: Timeout 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
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/dxgi/tests/dxgi.c | 2 -- dlls/dxgi/utils.c | 3 ++- dlls/wined3d/swapchain.c | 15 ++++++++++++++- include/wine/wined3d.h | 1 + 4 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index 6ff9dbe..81b80dc 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -5884,10 +5884,8 @@ static void test_swapchain_window_styles(void)
style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); - todo_wine_if(!(tests[i].expected_style & WS_VISIBLE)) ok(style == tests[i].expected_style, "Test %u: Got style %#x, expected %#x.\n", i, style, tests[i].expected_style); - todo_wine_if(!(tests[i].expected_exstyle & WS_EX_TOPMOST)) ok(exstyle == tests[i].expected_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", i, exstyle, tests[i].expected_exstyle);
diff --git a/dlls/dxgi/utils.c b/dlls/dxgi/utils.c index ca87e3c..9544117 100644 --- a/dlls/dxgi/utils.c +++ b/dlls/dxgi/utils.c @@ -513,7 +513,8 @@ unsigned int wined3d_bind_flags_from_dxgi_usage(DXGI_USAGE dxgi_usage) }
#define DXGI_WINED3D_SWAPCHAIN_FLAGS \ - (WINED3D_SWAPCHAIN_USE_CLOSEST_MATCHING_MODE | WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT | WINED3D_SWAPCHAIN_HOOK) + (WINED3D_SWAPCHAIN_USE_CLOSEST_MATCHING_MODE | WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT | WINED3D_SWAPCHAIN_HOOK | \ + WINED3D_SWAPCHAIN_RESTORE_WINDOW_STATE)
unsigned int dxgi_swapchain_flags_from_wined3d(unsigned int wined3d_flags) { diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 8ded2cb..81de3b4 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -2116,6 +2116,7 @@ void wined3d_swapchain_state_restore_from_fullscreen(struct wined3d_swapchain_st HWND window, const RECT *window_rect) { unsigned int window_pos_flags = SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOACTIVATE; + HWND window_pos_after = NULL; LONG style, exstyle; RECT rect = {0}; BOOL filter; @@ -2123,6 +2124,18 @@ void wined3d_swapchain_state_restore_from_fullscreen(struct wined3d_swapchain_st if (!state->style && !state->exstyle) return;
+ if (state->desc.flags & WINED3D_SWAPCHAIN_RESTORE_WINDOW_STATE) + { + if (!(state->desc.flags & WINED3D_SWAPCHAIN_NO_VISIBILITY_CHANGES)) + window_pos_flags |= (state->style & WS_VISIBLE) ? SWP_SHOWWINDOW : SWP_HIDEWINDOW; + + if (!(state->desc.flags & WINED3D_SWAPCHAIN_NO_ZORDER_CHANGES)) + { + window_pos_after = (state->exstyle & WS_EX_TOPMOST) ? HWND_TOPMOST : HWND_NOTOPMOST; + window_pos_flags &= ~SWP_NOZORDER; + } + } + style = GetWindowLongW(window, GWL_STYLE); exstyle = GetWindowLongW(window, GWL_EXSTYLE);
@@ -2154,7 +2167,7 @@ void wined3d_swapchain_state_restore_from_fullscreen(struct wined3d_swapchain_st rect = *window_rect; else window_pos_flags |= (SWP_NOMOVE | SWP_NOSIZE); - SetWindowPos(window, 0, rect.left, rect.top, + SetWindowPos(window, window_pos_after, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, window_pos_flags);
wined3d_filter_messages(window, filter); diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 726c715..25a1c5f 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -907,6 +907,7 @@ enum wined3d_shader_type #define WINED3D_SWAPCHAIN_HOOK 0x00020000u #define WINED3D_SWAPCHAIN_NO_ZORDER_CHANGES 0x00040000u #define WINED3D_SWAPCHAIN_NO_VISIBILITY_CHANGES 0x00080000u +#define WINED3D_SWAPCHAIN_RESTORE_WINDOW_STATE 0x00100000u
#define WINED3DDP_MAXTEXCOORD 8
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=74870
Your paranoid android.
=== w1064v1809 (64 bit report) ===
dxgi: dxgi.c:5545: Test failed: Got unexpected message 0x31f, hwnd 00000000000402E2, wparam 0x1, lparam 0. dxgi.c:2747: Test failed: Got unexpected hr 0x887a0022. dxgi.c:2750: Test failed: Got unexpected fullscreen 0. dxgi.c:2753: Test failed: Got unexpected hr 0x887a0022. dxgi.c:2756: Test failed: Got unexpected fullscreen 0.
=== debiant (32 bit report) ===
dxgi: dxgi: Timeout
=== debiant (32 bit French report) ===
dxgi: dxgi: 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_ja_JP report
=== debiant (32 bit WoW report) ===
dxgi: dxgi: Timeout
=== debiant (64 bit WoW report) ===
dxgi: dxgi: Timeout
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/d3d9/device.c | 2 ++ dlls/d3d9/tests/d3d9ex.c | 12 ++++-------- 2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 9b1dac0..898c59b 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -349,6 +349,8 @@ static BOOL wined3d_swapchain_desc_from_d3d9(struct wined3d_swapchain_desc *swap = wined3dformat_from_d3dformat(present_parameters->AutoDepthStencilFormat); swapchain_desc->flags = (present_parameters->Flags & D3DPRESENTFLAGS_MASK) | WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH; + if (extended) + swapchain_desc->flags |= WINED3D_SWAPCHAIN_RESTORE_WINDOW_STATE; if ((present_parameters->Flags & D3DPRESENTFLAG_LOCKABLE_BACKBUFFER) && (is_gdi_compat_wined3dformat(swapchain_desc->backbuffer_format) /* WINED3DFMT_UNKNOWN creates the swapchain with the current diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 2836fdd..97db3d4 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -3569,12 +3569,10 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style; - todo_wine_if (!(tests[i].style_flags & WS_VISIBLE) && !(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)) - ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", - expected_style, style, i); + 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; - todo_wine_if (!(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)) ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", expected_style, style, i);
@@ -3590,12 +3588,10 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style; - todo_wine_if (!(tests[i].style_flags & WS_VISIBLE) && !(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)) - ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", - expected_style, style, i); + 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; - todo_wine_if (!(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)) 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=74871
Your paranoid android.
=== debiant (32 bit report) ===
d3d9: d3d9ex: Timeout device: Timeout stateblock: Timeout visual: Timeout
=== debiant (32 bit French report) ===
d3d9: d3d9ex: Timeout
=== debiant (32 bit Chinese:China report) ===
d3d9: device.c:6147: Test failed: Got unexpected hr 0x1. device.c:6151: Test failed: Got unexpected hr 0x1. device.c:6152: Test failed: Got unexpected query result 0xffffffffffffffff. device.c:14065: Test failed: Adapter 0: Expect window rect (0,0)-(2560,1600), got (0,0)-(1024,768).
=== debiant (32 bit WoW report) ===
d3d9: d3d9ex: Timeout device: Timeout stateblock: Timeout visual: Timeout
=== debiant (64 bit WoW report) ===
d3d9: d3d9ex: Timeout
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/ddraw/ddraw.c | 3 ++- dlls/ddraw/tests/ddraw1.c | 2 +- dlls/ddraw/tests/ddraw2.c | 2 +- dlls/ddraw/tests/ddraw4.c | 2 +- dlls/ddraw/tests/ddraw7.c | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index e92ac25..c68a2b2 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -572,7 +572,8 @@ static HRESULT ddraw_attach_d3d_device(struct ddraw *ddraw, HWND window, swapchain_desc.swap_effect = WINED3D_SWAP_EFFECT_DISCARD; swapchain_desc.device_window = window; swapchain_desc.windowed = windowed; - swapchain_desc.flags = WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH | WINED3D_SWAPCHAIN_IMPLICIT; + swapchain_desc.flags = WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH | WINED3D_SWAPCHAIN_IMPLICIT | + WINED3D_SWAPCHAIN_NO_VISIBILITY_CHANGES;
if (ddraw->flags & DDRAW_NO3D) return wined3d_swapchain_create(ddraw->wined3d_device, &swapchain_desc, diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 82d8e94..330495f 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -2509,7 +2509,7 @@ static void test_window_style(void) ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp);
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 1d358e1..3db747f 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -2562,7 +2562,7 @@ static void test_window_style(void) ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp);
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 21195b1..40b36f4 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -2803,7 +2803,7 @@ static void test_window_style(void) ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp);
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 15f552f..edb1519 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -2451,7 +2451,7 @@ static void test_window_style(void) ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr);
tmp = GetWindowLongA(window, GWL_STYLE); - todo_wine ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); + ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp);
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=74872
Your paranoid android.
=== w1064v1809 (64 bit report) ===
ddraw: ddraw7.c:16302: Test failed: WM_KILLFOCUS was not received. ddraw7.c:16464: Test failed: Got unexpected hr 0x887600e1. ddraw7.c:16467: Test failed: Got unexpected hr 0x887600ff.
=== debiant (32 bit report) ===
d3d9: d3d9ex: Timeout device: Timeout stateblock: Timeout visual: Timeout
=== debiant (32 bit French report) ===
ddraw: ddraw1: Timeout
=== debiant (32 bit Japanese:Japan report) ===
ddraw: ddraw1.c:13659: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw1.c:13677: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw1.c:13684: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw2.c:14544: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw2.c:14562: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw2.c:14569: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw4.c:17600: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw4.c:17618: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw4.c:17625: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw7.c:17862: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw7.c:17880: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw7.c:17887: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768).
=== debiant (32 bit Chinese:China report) ===
d3d9: device.c:14065: Test failed: Adapter 0: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). device.c:14077: Test failed: Adapter 0: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). device.c:14095: Test failed: Adapter 0: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768).
ddraw: ddraw1.c:13659: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw1.c:13677: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw1.c:13684: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw2.c:14544: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw2.c:14562: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw2.c:14569: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw4.c:17600: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw4.c:17618: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw4.c:17625: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw7.c:17862: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw7.c:17880: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768). ddraw7.c:17887: Test failed: Expect window rect (0,0)-(800,600), got (0,0)-(1024,768).
=== debiant (32 bit WoW report) ===
d3d9: d3d9ex: Timeout device: Timeout stateblock: Timeout visual: Timeout
=== debiant (64 bit WoW report) ===
d3d9: d3d9ex: Timeout
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/ddraw/ddraw.c | 2 +- dlls/ddraw/tests/ddraw1.c | 2 +- dlls/ddraw/tests/ddraw2.c | 2 +- dlls/ddraw/tests/ddraw4.c | 2 +- dlls/ddraw/tests/ddraw7.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index c68a2b2..f9a3f3c 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -573,7 +573,7 @@ static HRESULT ddraw_attach_d3d_device(struct ddraw *ddraw, HWND window, swapchain_desc.device_window = window; swapchain_desc.windowed = windowed; swapchain_desc.flags = WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH | WINED3D_SWAPCHAIN_IMPLICIT | - WINED3D_SWAPCHAIN_NO_VISIBILITY_CHANGES; + WINED3D_SWAPCHAIN_NO_VISIBILITY_CHANGES | WINED3D_SWAPCHAIN_NO_ZORDER_CHANGES;
if (ddraw->flags & DDRAW_NO3D) return wined3d_swapchain_create(ddraw->wined3d_device, &swapchain_desc, diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 330495f..652e52a 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -2511,7 +2511,7 @@ static void test_window_style(void) tmp = GetWindowLongA(window, GWL_STYLE); ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp);
ShowWindow(window, SW_SHOW); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 3db747f..edaf868 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -2564,7 +2564,7 @@ static void test_window_style(void) tmp = GetWindowLongA(window, GWL_STYLE); ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp);
ShowWindow(window, SW_SHOW); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 40b36f4..d1abde0 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -2805,7 +2805,7 @@ static void test_window_style(void) tmp = GetWindowLongA(window, GWL_STYLE); ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp);
ShowWindow(window, SW_SHOW); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index edb1519..13eadfd 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -2453,7 +2453,7 @@ static void test_window_style(void) tmp = GetWindowLongA(window, GWL_STYLE); ok(tmp == style, "Expected window style %#x, got %#x.\n", style, tmp); tmp = GetWindowLongA(window, GWL_EXSTYLE); - todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp); + ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp);
ShowWindow(window, SW_SHOW); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
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=74873
Your paranoid android.
=== w1064v1809_2scr (32 bit report) ===
ddraw: ddraw1.c:1947: Test failed: Got unexpected color 0x000000ff.
=== w1064v1809 (32 bit report) ===
ddraw: ddraw7.c:4026: Test failed: Lit quad without normals has color 0x00ffff00, expected 0x00000000. ddraw7.c:4039: Test failed: Lit quad with normals has color 0x00ffff00, expected 0x00000000. ddraw7.c:4084: Test failed: Lit quad with light has color 0x00ffffff. ddraw7.c:4084: Test failed: Lit quad with singular world matrix has color 0x00ffffff. ddraw7.c:4084: Test failed: Lit quad with transformation matrix has color 0x00ffffff. ddraw7.c:4084: Test failed: Lit quad with non-affine matrix has color 0x00ffff00.
=== debiant (32 bit report) ===
d3d9: d3d9ex: Timeout device: Timeout stateblock: Timeout visual: Timeout
=== debiant (32 bit French report) ===
ddraw: ddraw1: Timeout
=== debiant (32 bit WoW report) ===
d3d9: d3d9ex: Timeout device: Timeout stateblock: Timeout visual: Timeout
=== debiant (64 bit WoW report) ===
d3d9: d3d9ex: Timeout
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=74865
Your paranoid android.
=== w1064v1809_ar (32 bit report) ===
dxgi: dxgi.c:5846: Test failed: Test 4: Got exstyle 0x108, expected 0x100. dxgi.c:5860: Test failed: Test 4: Got exstyle 0x108, expected 0x100. dxgi.c:5891: Test failed: Test 4: Got exstyle 0x108, expected 0x100. dxgi.c:5920: Test failed: Test 4: Got exstyle 0x108, expected 0x100. dxgi.c:5937: Test failed: Test 4: Got exstyle 0x108, expected 0x100.
=== debiant (32 bit report) ===
dxgi: dxgi: Timeout
=== debiant (32 bit French report) ===
dxgi: dxgi: 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_ja_JP report
=== debiant (32 bit WoW report) ===
dxgi: dxgi: Timeout
=== debiant (64 bit WoW report) ===
dxgi: dxgi: Timeout