Module: wine Branch: master Commit: e041ff1f91f2143c9710b70cbdc128c9a40e7a09 URL: https://source.winehq.org/git/wine.git/?a=commit;h=e041ff1f91f2143c9710b70cb...
Author: Gabriel Ivăncescu gabrielopcode@gmail.com Date: Wed Jul 8 00:01:13 2020 +0430
wined3d: Don't show the window if no window changes were requested.
Based on a patch by Rémi Bernon.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/d3d9/tests/d3d9ex.c | 4 ++-- dlls/d3d9/tests/device.c | 5 ++--- dlls/wined3d/swapchain.c | 4 +++- 3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 76565c4ec2..2836fdd5be 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 14ca12ecd8..53a83ad887 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].create_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].exstyle; todo_wine_if (!(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) && (tests[i].create_style & WS_VISIBLE)) diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 00d51d6f6d..a51b934af0 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -2065,7 +2065,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;
@@ -2085,6 +2085,8 @@ HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state
if (state->desc.flags & WINED3D_SWAPCHAIN_NO_WINDOW_CHANGES) window_pos_flags |= SWP_NOZORDER; + else + window_pos_flags |= SWP_SHOWWINDOW;
state->style = GetWindowLongW(window, GWL_STYLE); state->exstyle = GetWindowLongW(window, GWL_EXSTYLE);