win32: don't reopen hidden form when application is restored. Issue #30000, patch by errno.

git-svn-id: trunk@52395 -
This commit is contained in:
ondrej 2016-05-27 13:26:06 +00:00
parent 9e1350ef21
commit 22c9aa947d
2 changed files with 5 additions and 2 deletions

View File

@ -1743,7 +1743,10 @@ begin
else
Flags := SW_SHOWNOACTIVATE;
Windows.ShowWindow(Win32WidgetSet.AppHandle, Flags);
end;
end
else
if Assigned(lWinControl) and (WParam <> 0) and not lWinControl.Visible then
WinProcess := false;
end;
procedure TWindowProcHelper.DoMsgSysKey(aMsg: Cardinal);

View File

@ -373,7 +373,7 @@ begin
end;
SW_PARENTOPENING:
begin
if Info^.RestoreState <> 0 then
if (Info^.RestoreState <> 0) and WinControl.Visible then
begin
Windows.ShowWindowAsync(Window, Info^.RestoreState);
Info^.RestoreState := 0;