Zebediah Figura : user32: Use the C[XY]MINIMIZED rather than C[XY] ICON size for minimized windows.

Alexandre Julliard julliard at winehq.org
Tue Feb 19 15:29:35 CST 2019


Module: wine
Branch: master
Commit: 118f333ac233c69399a01424a6218d130983d644
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=118f333ac233c69399a01424a6218d130983d644

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Feb 19 12:17:38 2019 -0600

user32: Use the C[XY]MINIMIZED rather than C[XY]ICON size for minimized windows.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/tests/win.c |  6 ------
 dlls/user32/winpos.c    | 12 ++++++------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 308e243..8111ec0 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -6529,7 +6529,6 @@ static void test_ShowWindow(void)
     ok(style & WS_MINIMIZE, "window should be minimized\n");
     ok(!(style & WS_MAXIMIZE), "window should not be maximized\n");
     GetWindowRect(hwnd, &rc);
-    todo_wine
     ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
        wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
     GetClientRect(hwnd, &rc);
@@ -6542,7 +6541,6 @@ static void test_ShowWindow(void)
                        SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
     ok(ret, "not expected ret: %lu\n", ret);
     GetWindowRect(hwnd, &rc);
-    todo_wine
     ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
        wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
     GetClientRect(hwnd, &rc);
@@ -6553,7 +6551,6 @@ static void test_ShowWindow(void)
                        SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
     ok(ret, "not expected ret: %lu\n", ret);
     GetWindowRect(hwnd, &rc);
-    todo_wine
     ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
        wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
     GetClientRect(hwnd, &rc);
@@ -6650,7 +6647,6 @@ static void test_ShowWindow(void)
     ok(style & WS_MINIMIZE, "window should be minimized\n");
     ok(!(style & WS_MAXIMIZE), "window should not be maximized\n");
     GetWindowRect(hwnd, &rc);
-    todo_wine
     ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
        wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
     GetClientRect(hwnd, &rc);
@@ -6665,7 +6661,6 @@ static void test_ShowWindow(void)
     ok(style & WS_MINIMIZE, "window should be minimized\n");
     ok(!(style & WS_MAXIMIZE), "window should not be maximized\n");
     GetWindowRect(hwnd, &rc);
-    todo_wine
     ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
        wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
     GetClientRect(hwnd, &rc);
@@ -6725,7 +6720,6 @@ static void test_ShowWindow(void)
     style = GetWindowLongA(hwnd, GWL_STYLE);
     ok(style & WS_MINIMIZE, "window should be minimized\n");
     GetWindowRect(hwnd, &rc);
-    todo_wine
     ok(EqualRect(&rcMinimized, &rc), "expected %s, got %s\n",
        wine_dbgstr_rect(&rcMinimized), wine_dbgstr_rect(&rc));
     GetClientRect(hwnd, &rc);
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 38444b2..bca50ca 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -975,8 +975,8 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
             wpl.ptMinPosition = WINPOS_FindIconPos( hwnd, wpl.ptMinPosition );
 
             SetRect( rect, wpl.ptMinPosition.x, wpl.ptMinPosition.y,
-                     wpl.ptMinPosition.x + GetSystemMetrics(SM_CXICON),
-                     wpl.ptMinPosition.y + GetSystemMetrics(SM_CYICON) );
+                     wpl.ptMinPosition.x + GetSystemMetrics(SM_CXMINIMIZED),
+                     wpl.ptMinPosition.y + GetSystemMetrics(SM_CYMINIMIZED) );
             return SWP_NOSIZE | SWP_NOMOVE;
         }
         if (!SendMessageW( hwnd, WM_QUERYOPEN, 0, 0 )) return SWP_NOSIZE | SWP_NOMOVE;
@@ -1006,8 +1006,8 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
 
         if (!(old_style & WS_MINIMIZE)) swpFlags |= SWP_STATECHANGED;
         SetRect( rect, wpl.ptMinPosition.x, wpl.ptMinPosition.y,
-                 wpl.ptMinPosition.x + GetSystemMetrics(SM_CXICON),
-                 wpl.ptMinPosition.y + GetSystemMetrics(SM_CYICON) );
+                 wpl.ptMinPosition.x + GetSystemMetrics(SM_CXMINIMIZED),
+                 wpl.ptMinPosition.y + GetSystemMetrics(SM_CYMINIMIZED) );
         swpFlags |= SWP_NOCOPYBITS;
         break;
 
@@ -1705,8 +1705,8 @@ static BOOL SWP_DoWinPosChanging( WINDOWPOS *pWinpos, RECT *old_window_rect, REC
     {
         if (wndPtr->dwStyle & WS_MINIMIZE)
         {
-            new_window_rect->right  = new_window_rect->left + GetSystemMetrics(SM_CXICON);
-            new_window_rect->bottom = new_window_rect->top + GetSystemMetrics(SM_CYICON);
+            new_window_rect->right  = new_window_rect->left + GetSystemMetrics(SM_CXMINIMIZED);
+            new_window_rect->bottom = new_window_rect->top + GetSystemMetrics(SM_CYMINIMIZED);
         }
         else
         {




More information about the wine-cvs mailing list