https://git.reactos.org/?p=reactos.git;a=commitdiff;h=db810d8e443ca4285f83d…
commit db810d8e443ca4285f83d20ce6ab863c2ef028e6
Author: Denis Malikov <Getequ(a)users.noreply.github.com>
AuthorDate: Wed Nov 24 05:34:03 2021 +0700
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Nov 23 23:34:03 2021 +0100
[WIN32SS:NTUSER] Fix window state after restoring snapped window (#4119)
InternalPos.NormalRect is a key data for detecting whether a window was snapped.
Keeping it after restore affecting next snap actions.
CORE-16477
---
win32ss/user/ntuser/defwnd.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/win32ss/user/ntuser/defwnd.c b/win32ss/user/ntuser/defwnd.c
index ea6adc73844..846a131cfb3 100644
--- a/win32ss/user/ntuser/defwnd.c
+++ b/win32ss/user/ntuser/defwnd.c
@@ -815,9 +815,16 @@ IntDefWindowProc(
if (wParam == VK_DOWN)
{
if (topWnd->style & WS_MAXIMIZE)
+ {
co_IntSendMessage(hwndTop, WM_SYSCOMMAND, SC_RESTORE, lParam);
+
+ /* "Normal size" must be erased after restoring,
otherwise it will block next side snap actions */
+ RECTL_vSetEmptyRect(&topWnd->InternalPos.NormalRect);
+ }
else
+ {
co_IntSendMessage(hwndTop, WM_SYSCOMMAND, SC_MINIMIZE, lParam);
+ }
}
else if (wParam == VK_UP)
{