Hydra Close Application Issue

Hi,

Hydra version Latest:
delphi 10.4

Host : VCL
Plugin: FMX

At Host I Implment a Interface:

  IShareInterface = interface
   ['{6BDC2AD1-89AE-4CF7-90FC-FF5997246846}']
    Procedure showResult(state:string); //NONE,PASS,FAIL,WARN
   end;

procedure TForm2.showResult(state: string);
begin
  ShowMessage('My Vcl :'+state);

// or u create a form and showmodal, same effect
end;

At FMX Plugin,

I put TEdit, TButton

On Button Click:

procedure TForm1.Button1Click(Sender: TObject);
begin
  (Host As IShareInterface).showResult('U cannot close noq');
end;

If you dont click the button, u close the application.

if you click the button and showmessage, then u click close in the form, it never close.

unitil u click into the tedit or the click the plugin form any where, u can close;

I attached the sample project. please comment

Hydra-Bug.zip (39.7 KB)

One more issue when the host , minimize by host main form minimize system, it cant restore.

Hi,
I can reproduce this issue.
as a temporary workaround, you can use this code:

procedure TForm1.Button1Click(Sender: TObject);
begin
  (Host As IShareInterface).showResult('U cannot close noq');
  (Self.ControlAsVisualPlugin as THYFMXControlAsVisualPlugin).HostFocusLost; //added
end;

it will return possibility to close main form.

Edit: Minimizing issue, add this code to host main form:

procedure TForm2.resetFocus(Sender: TObject);
begin
  PluginContainer.SetFocus;
end;

procedure TForm2.FormCreate(Sender: TObject);
begin
  Application.OnRestore := resetFocus;
end;

Thanks, logged as bugs://84773

Hi,
I follow what you suggested
The restore not work.

My delphi is 10.4 patch 3 .

Please advise

how’s status? any new solution?

Hi,
workaround with Application.OnRestore works for me.
22751.zip (31.0 KB)

you are correct. My Project CreateFormIssue

I did not use Application.Createform to do the mainform Creation Trigger the problem.

Thew newest version RemObjects Hydra - 6.3.0.1257.exe fixed this close and restore issue ?

Hi,

this issue isn’t fixed yet

Hi,

comment code inside THYVCLCrossPlatformPanel.CMUIActivate (uHYVCLCrossPlatformPanel.pas) like

procedure THYVCLCrossPlatformPanel.CMUIActivate(var Message: TMessage);
begin
//  if (GetParentForm(Self).ActiveControl = Self) and (not fFocusChanging) then
//    Windows.SetFocus(CrossPlatformVisualPlugin.GetHandle);
end;

after this launch C:\Program Files (x86)\RemObjects Software\Build\install_HY.cmd for recreating packages.

this will solve this issue.

bugs://84773 got closed with status fixed.

bugs://H971 was closed as fixed.