lcl: delay autosize when form is minimized, bug #30826

git-svn-id: trunk@53334 -
This commit is contained in:
mattias 2016-11-10 10:21:47 +00:00
parent e50e59fab7
commit 0a383ad832

View File

@ -1148,7 +1148,7 @@ begin
begin
if (State = wsMinimized) and (Application.MainForm = Self) and
(WidgetSet.GetLCLCapability(lcNeedMininimizeAppWithMainForm) <> LCL_CAPABILITY_NO) then
Application.Minimize;
Application.Minimize;
if (OldState = wsMinimized) and (Application.MainForm = Self) and
(WidgetSet.GetLCLCapability(lcNeedMininimizeAppWithMainForm) <> LCL_CAPABILITY_NO) then
Application.Restore;
@ -2267,7 +2267,10 @@ end;
------------------------------------------------------------------------------}
function TCustomForm.AutoSizeDelayedHandle: Boolean;
begin
if (Parent<>nil) or (ParentWindow<>0) then
if WindowState=wsMinimized then
// this form is minimized => no valid width/height, see bug 30826
Result:=true
else if (Parent<>nil) or (ParentWindow<>0) then
// this form is inlined / embedded it works like a normal TWinControl
Result:=inherited AutoSizeDelayedHandle
else