Commit 106e142a authored by Juha Manninen's avatar Juha Manninen
Browse files

LCL: Wait for the first WMSize() before triggering onShow()/onActivate() of a...

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

git-svn-id: trunk@62113 -
parent f955aac4
......@@ -691,19 +691,22 @@ begin
end;
DoOnChangeBounds; // delayed onChangeBounds()
end;
FDelayedWMMove := False;
FDelayedWMSize := False;
{ call onShow() or onActivate() for the first time }
if FIsFirstOnShow then
{ call onShow() or onActivate() for the first time, after first WMSize }
if FDelayedWMSize then
begin
FIsFirstOnShow := False;
DoShow;
end;
if FIsFirstOnActivate then
begin
FIsFirstOnActivate := False;
Activate;
if FIsFirstOnShow then
begin
FIsFirstOnShow := False;
DoShow;
end;
if FIsFirstOnActivate then
begin
FIsFirstOnActivate := False;
Activate;
end;
end;
FDelayedWMMove := False;
FDelayedWMSize := False;
end;
procedure TCustomForm.WMWindowPosChanged(var Message: TLMWindowPosChanged);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment