[PATCH 5/8] wined3d: Don't show the window if no window changes were requested.
Henri Verbeet
hverbeet at codeweavers.com
Tue Jul 7 14:13:13 CDT 2020
From: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Based on a patch by Rémi Bernon.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
This supersedes patch 188410.
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 76565c4ec2c..2836fdd5bef 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 14ca12ecd87..53a83ad887b 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 00d51d6f6d4..a51b934af02 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);
--
2.20.1
More information about the wine-devel
mailing list