From: Zhiyi Zhang zzhang@codeweavers.com
Partially fix Imperiums: Greek Wars (1183470) not covering the entire screen in fullscreen mode. --- dlls/user32/tests/win.c | 2 -- dlls/win32u/window.c | 7 ++----- 2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 4c4ee032570..8f9505ece9f 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -7805,7 +7805,6 @@ static void test_ShowWindow(void) style = GetWindowLongA(hwnd, GWL_STYLE); ok(style & WS_MAXIMIZE, "Test %u: window should be maximized.\n", i); GetWindowRect(hwnd, &rc); - todo_wine_if(test_style[i] & WS_MAXIMIZEBOX) ok(EqualRect(&rcMaximized, &rc), "Test %u: expected %s, got %s.\n", i, wine_dbgstr_rect(&rcMaximized), wine_dbgstr_rect(&rc)); } @@ -8137,7 +8136,6 @@ static void test_ShowWindow_child(HWND hwndMain) style = GetWindowLongA(hwnd2, GWL_STYLE); ok(style & WS_MAXIMIZE, "window should be maximized.\n"); GetWindowRect(hwnd2, &rect); - todo_wine_if((test_style[i] & WS_CAPTION) == WS_CAPTION && test_style[i] & WS_MAXIMIZEBOX) ok(EqualRect(&maximized_rect, &rect), "expected %s, got %s.\n", wine_dbgstr_rect(&maximized_rect), wine_dbgstr_rect(&rect));
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 3fb64755ba0..374b55e0011 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -2690,11 +2690,8 @@ static BOOL get_work_rect( HWND hwnd, RECT *rect ) *rect = mon_info.rcMonitor;
style = get_window_long( hwnd, GWL_STYLE ); - if (style & WS_MAXIMIZEBOX) - { - if ((style & WS_CAPTION) == WS_CAPTION || !(style & (WS_CHILD | WS_POPUP))) - *rect = mon_info.rcWork; - } + if (style & WS_MAXIMIZEBOX && (style & WS_CAPTION) == WS_CAPTION && !(style & WS_CHILD)) + *rect = mon_info.rcWork; return TRUE; }