Преглед изворни кода

Swap order in BringToFrontAndRestore support function to work around VCL bug.

If Application.BringToFront is called while the app is minimized, the Forms unit's WM_ACTIVATEAPP handler inexplicably sets FAppIconic=False, which causes the next Application.Restore call to be a no-op.

Jordan Russell пре 8 месеци
родитељ
комит
f6f2f17381
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      Projects/Src/Setup.ScriptFunc.pas

+ 2 - 1
Projects/Src/Setup.ScriptFunc.pas

@@ -1587,8 +1587,9 @@ var
   begin
     RegisterScriptFunc('BRINGTOFRONTANDRESTORE', procedure(const Caller: TPSExec; const OrgName: AnsiString; const Stack: TPSStack; const PStart: Cardinal)
     begin
-      Application.BringToFront;
+      { Must be in this order to work around VCL bug }
       Application.Restore;
+      Application.BringToFront;
     end);
     RegisterScriptFunc('WizardDirValue', sfNoUninstall, procedure(const Caller: TPSExec; const OrgName: AnsiString; const Stack: TPSStack; const PStart: Cardinal)
     begin