[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
This commit is contained in:
Denis Malikov 2021-11-24 05:34:03 +07:00 committed by GitHub
parent 6a4ca215ab
commit db810d8e44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
{