[PATCH 4/8] d3d8: Do not modify window styles anymore.

Rémi Bernon rbernon at codeweavers.com
Wed Mar 11 09:36:30 CDT 2020


Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 dlls/d3d8/device.c       |  3 ++-
 dlls/d3d8/tests/device.c | 10 +++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index d6253a4a2bf..a62b6120a8b 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -300,7 +300,8 @@ static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapch
     swapchain_desc->auto_depth_stencil_format
             = wined3dformat_from_d3dformat(present_parameters->AutoDepthStencilFormat);
     swapchain_desc->flags
-            = (present_parameters->Flags & D3DPRESENTFLAGS_MASK) | WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH;
+            = (present_parameters->Flags & D3DPRESENTFLAGS_MASK) | WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH |
+              WINED3D_SWAPCHAIN_NO_STYLE_CHANGES;
     swapchain_desc->refresh_rate = present_parameters->FullScreen_RefreshRateInHz;
     swapchain_desc->auto_restore_display_mode = TRUE;
 
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index 008395df1a6..533bae42d12 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -3784,12 +3784,12 @@ static void test_window_style(void)
 
     style = GetWindowLongA(device_window, GWL_STYLE);
     expected_style = device_style | WS_VISIBLE;
-    todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */,
+    ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */,
             "Expected device window style %#x, got %#x.\n",
             expected_style, style);
     style = GetWindowLongA(device_window, GWL_EXSTYLE);
     expected_style = device_exstyle | WS_EX_TOPMOST;
-    todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */,
+    ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */,
             "Expected device window extended style %#x, got %#x.\n",
             expected_style, style);
 
@@ -3804,7 +3804,7 @@ static void test_window_style(void)
     ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n",
             wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r));
     GetClientRect(device_window, &r);
-    todo_wine ok(!EqualRect(&r, &fullscreen_rect) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */,
+    ok(!EqualRect(&r, &fullscreen_rect) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */,
         "Client rect and window rect are equal.\n");
     GetWindowRect(focus_window, &r);
     ok(EqualRect(&r, &focus_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&focus_rect),
@@ -3838,11 +3838,11 @@ static void test_window_style(void)
 
     style = GetWindowLongA(device_window, GWL_STYLE);
     expected_style = device_style | WS_MINIMIZE | WS_VISIBLE;
-    todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x.\n",
+    ok(style == expected_style, "Expected device window style %#x, got %#x.\n",
             expected_style, style);
     style = GetWindowLongA(device_window, GWL_EXSTYLE);
     expected_style = device_exstyle | WS_EX_TOPMOST;
-    todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x.\n",
+    ok(style == expected_style, "Expected device window extended style %#x, got %#x.\n",
             expected_style, style);
 
     style = GetWindowLongA(focus_window, GWL_STYLE);
-- 
2.25.0




More information about the wine-devel mailing list