[PATCH v2 3/9] d3d9/tests: Add more visibility tests.

Gabriel Ivăncescu gabrielopcode at gmail.com
Mon Jul 6 09:57:14 CDT 2020


From: Rémi Bernon <rbernon at codeweavers.com>

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at 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);
-- 
2.21.0




More information about the wine-devel mailing list