[PATCH 2/2] user32/tests: Test window with WS_THICKFRAME larger than fullscreen.

Gabriel Ivăncescu gabrielopcode at gmail.com
Thu Sep 23 09:24:46 CDT 2021


Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
 dlls/user32/tests/win.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index e23ab81..ec69bad 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -8673,6 +8673,19 @@ static void test_fullscreen(void)
     ok(rc.bottom - rc.top == 100, "Expect height %d, got %d.\n", 100, rc.bottom - rc.top);
     DestroyWindow(hwnd);
 
+    /* Test a visible larger-than-fullscreen window with WS_THICKFRAME style, should keep its size */
+    hwnd = CreateWindowA("static", NULL, WS_POPUP | WS_THICKFRAME, 0, 0, mi.rcMonitor.right + 10,
+                         mi.rcMonitor.bottom + 10, NULL, NULL, GetModuleHandleA(NULL), NULL);
+    ok(!!hwnd, "CreateWindow failed, error %#x.\n", GetLastError());
+    ShowWindow(hwnd, SW_SHOW);
+    flush_events(TRUE);
+    Sleep(200);
+    flush_events(TRUE);
+    GetWindowRect(hwnd, &rc);
+    ok(rc.right - rc.left == mi.rcMonitor.right + 10, "Expect width %d, got %d.\n", mi.rcMonitor.right + 10, rc.right - rc.left);
+    ok(rc.bottom - rc.top == mi.rcMonitor.bottom + 10, "Expect height %d, got %d.\n", mi.rcMonitor.bottom + 10, rc.bottom - rc.top);
+    DestroyWindow(hwnd);
+
     UnregisterClassA("fullscreen_class", GetModuleHandleA(NULL));
 }
 
-- 
2.31.1




More information about the wine-devel mailing list