LCL: Wait for the first WMSize() before triggering onShow()/onActivate() of a form. Issue #36127, patch from Joeny Ang.

git-svn-id: trunk@62113 -
This commit is contained in:
juha 2019-10-24 22:34:22 +00:00
parent f955aac408
commit 106e142af0

View File

@ -691,19 +691,22 @@ begin
end;
DoOnChangeBounds; // delayed onChangeBounds()
end;
{ call onShow() or onActivate() for the first time, after first WMSize }
if FDelayedWMSize then
begin
if FIsFirstOnShow then
begin
FIsFirstOnShow := False;
DoShow;
end;
if FIsFirstOnActivate then
begin
FIsFirstOnActivate := False;
Activate;
end;
end;
FDelayedWMMove := False;
FDelayedWMSize := False;
{ call onShow() or onActivate() for the first time }
if FIsFirstOnShow then
begin
FIsFirstOnShow := False;
DoShow;
end;
if FIsFirstOnActivate then
begin
FIsFirstOnActivate := False;
Activate;
end;
end;
procedure TCustomForm.WMWindowPosChanged(var Message: TLMWindowPosChanged);