[0.4.13][WIN32SS:NTUSER] Fix window state after restoring snapped window (#4119) CORE-16477

InternalPos.NormalRect is a key data for detecting whether a window was snapped.
Keeping it after restore affecting next snap actions.

The snapping-feature was added by 0.4.12-dev-373-g 7e396787ed

Fix picked from 0.4.15-dev-3422-g db810d8e44
This commit is contained in:
Joachim Henze 2022-02-05 04:51:43 +01:00
parent d7b3d79c8a
commit 686421a030

View file

@ -813,9 +813,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)
{