mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2026-06-13 16:05:40 +02:00
Fixed browser destruction issue in QT6 demos
Set CEFLinkedWindowParent1.TabStop to True in MiniBrowser demo for QT6 Fixed directories in MiniBrowser project file for QT6.
This commit is contained in:
@@ -52,11 +52,14 @@
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="../../../bin/MiniBrowser"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="../../../source;$(ProjOutDir)"/>
|
||||
<Libraries Value="../../../source"/>
|
||||
<OtherUnitFiles Value="../../../source"/>
|
||||
<UnitOutputDirectory Value="../../../bin"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
<ObjectPath Value="../../../source"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
|
||||
@@ -240,6 +240,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
||||
Top = 41
|
||||
Width = 1196
|
||||
Align = alClient
|
||||
TabStop = True
|
||||
TabOrder = 2
|
||||
OnEnter = CEFLinkedWindowParent1Enter
|
||||
OnExit = CEFLinkedWindowParent1Exit
|
||||
|
||||
@@ -39,7 +39,6 @@ type
|
||||
|
||||
procedure CEFLinkedWindowParent1Enter(Sender: TObject);
|
||||
procedure CEFLinkedWindowParent1Exit(Sender: TObject);
|
||||
procedure Chromium1GotFocus(Sender: TObject; const browser: ICefBrowser);
|
||||
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
@@ -50,6 +49,7 @@ type
|
||||
procedure Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
|
||||
procedure Chromium1BeforeContextMenu(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel);
|
||||
procedure Chromium1ContextMenuCommand(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: TCefEventFlags; out Result: Boolean);
|
||||
procedure Chromium1GotFocus(Sender: TObject; const browser: ICefBrowser);
|
||||
procedure Chromium1LoadError(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; errorCode: TCefErrorCode; const errorText, failedUrl: ustring);
|
||||
procedure Chromium1StatusMessage(Sender: TObject; const browser: ICefBrowser; const value: ustring);
|
||||
procedure Chromium1TitleChange(Sender: TObject; const browser: ICefBrowser; const title: ustring);
|
||||
@@ -243,7 +243,6 @@ end;
|
||||
procedure TMiniBrowserFrm.CEFLinkedWindowParent1Enter(Sender: TObject);
|
||||
begin
|
||||
if not(csDesigning in ComponentState) and
|
||||
Chromium1.Initialized and
|
||||
not(Chromium1.FrameIsFocused) then
|
||||
Chromium1.SetFocus(True);
|
||||
end;
|
||||
|
||||
@@ -121,10 +121,13 @@ end;
|
||||
procedure TChildForm.Chromium1BeforeClose(Sender: TObject;
|
||||
const browser: ICefBrowser);
|
||||
begin
|
||||
// We must wait until all browsers trigger the TChromium.OnBeforeClose event
|
||||
// in order to close the application safely or we will have shutdown issues.
|
||||
FCanClose := True;
|
||||
SendCompMessage(CEF_BEFORECLOSE);
|
||||
if (Chromium1.BrowserId = 0) then
|
||||
begin
|
||||
// We must wait until all browsers trigger the TChromium.OnBeforeClose event
|
||||
// in order to close the application safely or we will have shutdown issues.
|
||||
FCanClose := True;
|
||||
SendCompMessage(CEF_BEFORECLOSE);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TChildForm.Chromium1BeforePopup(Sender: TObject;
|
||||
|
||||
@@ -271,10 +271,13 @@ end;
|
||||
procedure TMainForm.Chromium1BeforeClose(Sender: TObject;
|
||||
const browser: ICefBrowser);
|
||||
begin
|
||||
// We must wait until all browsers trigger the TChromium.OnBeforeClose event
|
||||
// in order to close the application safely or we will have shutdown issues.
|
||||
FCanClose := True;
|
||||
SendCompMessage(CEF_BEFORECLOSE);
|
||||
if (Chromium1.BrowserId = 0) then
|
||||
begin
|
||||
// We must wait until all browsers trigger the TChromium.OnBeforeClose event
|
||||
// in order to close the application safely or we will have shutdown issues.
|
||||
FCanClose := True;
|
||||
SendCompMessage(CEF_BEFORECLOSE);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.Chromium1BeforePopup(Sender: TObject;
|
||||
|
||||
@@ -272,10 +272,13 @@ end;
|
||||
procedure TMainForm.Chromium1BeforeClose(Sender: TObject;
|
||||
const browser: ICefBrowser);
|
||||
begin
|
||||
// We must wait until all browsers trigger the TChromium.OnBeforeClose event
|
||||
// in order to close the application safely or we will have shutdown issues.
|
||||
FCanClose := True;
|
||||
SendCompMessage(CEF_BEFORECLOSE);
|
||||
if (Chromium1.BrowserId = 0) then
|
||||
begin
|
||||
// We must wait until all browsers trigger the TChromium.OnBeforeClose event
|
||||
// in order to close the application safely or we will have shutdown issues.
|
||||
FCanClose := True;
|
||||
SendCompMessage(CEF_BEFORECLOSE);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.Chromium1BeforePopup(Sender: TObject;
|
||||
|
||||
@@ -320,7 +320,8 @@ end;
|
||||
procedure TBrowserFrame.Chromium1BeforeClose(Sender: TObject;
|
||||
const browser: ICefBrowser);
|
||||
begin
|
||||
if assigned(FOnBrowserDestroyed) then FOnBrowserDestroyed(self);
|
||||
if (Chromium1.BrowserId = 0) and assigned(FOnBrowserDestroyed) then
|
||||
FOnBrowserDestroyed(self);
|
||||
end;
|
||||
|
||||
procedure TBrowserFrame.Chromium1BeforePopup(Sender: TObject;
|
||||
|
||||
Reference in New Issue
Block a user