https://git.reactos.org/?p=reactos.git;a=commitdiff;h=37af78775ddb371501fbc…
commit 37af78775ddb371501fbcfb74c766a7d68f5470a
Author: Denis Malikov <Getequ(a)users.noreply.github.com>
AuthorDate: Sun Jan 20 05:05:19 2019 +0700
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Jan 19 23:05:19 2019 +0100
[WIN32SS:NTUSER] Fix Window-snap madness (#1246)
Desktop window was treated as possible to resize.
Fix for 7e396787
CORE-15624
---
win32ss/user/ntuser/defwnd.c | 5 +++++
win32ss/user/ntuser/nonclient.c | 6 +++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/win32ss/user/ntuser/defwnd.c b/win32ss/user/ntuser/defwnd.c
index 67215d1f26..fc55c4acfb 100644
--- a/win32ss/user/ntuser/defwnd.c
+++ b/win32ss/user/ntuser/defwnd.c
@@ -787,6 +787,11 @@ IntDefWindowProc(
PWND topWnd = UserGetWindowObject(hwndTop);
if (topWnd)
{
+ if ((topWnd->style & WS_THICKFRAME) == 0)
+ {
+ return 0;
+ }
+
if (wParam == VK_DOWN)
{
if (topWnd->style & WS_MAXIMIZE)
diff --git a/win32ss/user/ntuser/nonclient.c b/win32ss/user/ntuser/nonclient.c
index 7a5fcc445e..ba8dececb1 100644
--- a/win32ss/user/ntuser/nonclient.c
+++ b/win32ss/user/ntuser/nonclient.c
@@ -395,7 +395,7 @@ DefWndDoSizeMove(PWND pwnd, WORD wParam)
if (msg.message == WM_LBUTTONUP)
{
// check for snapping if was moved by caption
- if (hittest == HTCAPTION)
+ if (hittest == HTCAPTION && thickframe && (ExStyle &
WS_EX_MDICHILD) == 0)
{
RECT snapRect;
BOOL doSideSnap = FALSE;
@@ -1618,6 +1618,10 @@ NC_HandleNCLButtonDblClk(PWND pWnd, WPARAM wParam, LPARAM lParam)
case HTBOTTOM:
{
RECT sizingRect = pWnd->rcWindow, mouseRect;
+
+ if (pWnd->ExStyle & WS_EX_MDICHILD)
+ break;
+
UserSystemParametersInfo(SPI_GETWORKAREA, 0, &mouseRect, 0);
co_WinPosSetWindowPos(pWnd,