1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-12 22:07:39 +02:00

Fixed UTF8 string conversion in SimpleBrowser for Linux

- Removed "cmem" and "interfaces" from the TinyBrowser2 demo for Linux.
- Simplified the code of the TinyBrowser2 demo for Linux.
- Added the workaround for the CEF focus issue to TChromiumWindow in Linux.
- Set the result type of GetChildWindowHandle to LclType.THandle in FPC for TCEFWinControl, TCEFLinkedWindowParent and TChromiumWindow.
This commit is contained in:
Salvador Diaz Fau
2021-02-21 11:11:08 +01:00
parent 8c8e43b671
commit 51d8c20f63
8 changed files with 90 additions and 59 deletions

View File

@ -64,7 +64,7 @@ type
procedure FormCreate(Sender: TObject);
procedure ChromiumWindow1AfterCreated(Sender: TObject);
procedure ChromiumWindow1BeforeClose(Sender: TObject);
procedure ChromiumWindow1BeforeClose(Sender: TObject);
private
protected
@ -136,7 +136,7 @@ begin
FClosing := False;
// The browser will load the URL in AddressEdt initially.
ChromiumWindow1.ChromiumBrowser.DefaultURL := AddressEdt.Text;
ChromiumWindow1.ChromiumBrowser.DefaultURL := UTF8Decode(AddressEdt.Text);
end;
procedure TForm1.Chromium_OnBeforePopup(Sender: TObject;
@ -160,7 +160,7 @@ end;
procedure TForm1.GoBtnClick(Sender: TObject);
begin
// This will load the URL in the edit box
ChromiumWindow1.LoadURL(AddressEdt.Text);
ChromiumWindow1.LoadURL(UTF8Decode(AddressEdt.Text));
end;
procedure TForm1.FormActivate(Sender: TObject);