lcl: win32: fixed change WindowState from wsMaximized to wsNormal when changing Constraints, issue #41325

This commit is contained in:
mattias 2025-01-08 17:21:57 +01:00
parent 832b61143a
commit fad6cd5192

View File

@ -659,7 +659,18 @@ begin
with LMessage do
begin
Msg := LM_SIZE;
SizeType := SIZE_RESTORED or Size_SourceIsInterface;
SizeType := SIZE_RESTORED;
if Sender is TCustomForm then
begin
case TCustomForm(Sender).WindowState of
wsNormal: SizeType:=SIZE_RESTORED;
wsMinimized: SizeType:=SIZE_MINIMIZED;
wsMaximized: SizeType:=SIZE_MAXIMIZED;
wsFullScreen: SizeType:=SIZE_FULLSCREEN;
end;
end;
SizeType:=SizeType or Size_SourceIsInterface;
Width := IntfWidth;
Height := IntfHeight;
end;