[NtUser] Fix maximizing to window edge
authorjimtabor <james.tabor@reactos.org>
Wed, 27 Mar 2019 22:39:04 +0000 (17:39 -0500)
committerjimtabor <james.tabor@reactos.org>
Wed, 27 Mar 2019 22:39:04 +0000 (17:39 -0500)
Cover up the edge of the frame while maximizing the window to desktop.
Fixes CORE-15893.

win32ss/user/ntuser/winpos.c

index 2083526..d7f5ad6 100644 (file)
@@ -958,6 +958,10 @@ co_WinPosGetMinMaxInfo(PWND Window, POINT* MaxSize, POINT* MaxPos,
 
     adjust = IntGetWindowBorders(adjustedStyle, exstyle);
 
+    // Handle special case while maximized. CORE-15893
+    if ((adjustedStyle & WS_THICKFRAME) && !(adjustedStyle & WS_CHILD) && !(adjustedStyle & WS_MINIMIZE))
+         adjust += 2;
+
     xinc = yinc = adjust;
 
     if ((adjustedStyle & WS_THICKFRAME) && (adjustedStyle & WS_CHILD) && !(adjustedStyle & WS_MINIMIZE))