You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-22 22:17:48 +02:00
Added GlobalCEFApp.GTKVersion in Linux
Set GlobalCEFApp.GTKVersion to gtkVersion3 in TinyBrowser and TinyBrowser2 for Lazarus and GTK3 in order to avoid an initial error because the app and Chromium are trying to load diferent versions of GTK.
This commit is contained in:
@ -163,6 +163,7 @@ type
|
||||
FPostQuantumKyber : TCefState;
|
||||
{$IFDEF LINUX}
|
||||
FPasswordStorage : TCefPasswordStorage;
|
||||
FGTKVersion : TCefGTKVersion;
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
@ -1325,6 +1326,13 @@ type
|
||||
/// <para><see href="https://source.chromium.org/chromium/chromium/src/+/main:docs/linux/password_storage.md">Chromium document: docs/linux/password_storage.md</see></para>
|
||||
/// </remarks>
|
||||
property PasswordStorage : TCefPasswordStorage read FPasswordStorage write FPasswordStorage;
|
||||
/// <summary>
|
||||
/// Preferred GTK version loaded by Chromium.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para><see href="https://github.com/chromium/chromium/blob/main/ui/gtk/gtk_compat.cc">See the LoadGtkImpl function in ui/gtk/gtk_compat.cc</see></para>
|
||||
/// </remarks>
|
||||
property GTKVersion : TCefGTKVersion read FGTKVersion write FGTKVersion;
|
||||
{$ENDIF}
|
||||
/// <summary>
|
||||
/// Ignores certificate-related errors.
|
||||
@ -2003,6 +2011,7 @@ begin
|
||||
FPostQuantumKyber := STATE_DEFAULT;
|
||||
{$IFDEF LINUX}
|
||||
FPasswordStorage := psDefault;
|
||||
FGTKVersion := gtkVersionDefault;
|
||||
{$ENDIF}
|
||||
|
||||
// Fields used during the CEF initialization
|
||||
@ -3687,6 +3696,11 @@ begin
|
||||
psKWallet6 : ReplaceSwitch(aKeys, aValues, '--password-store', 'kwallet6');
|
||||
psBasic : ReplaceSwitch(aKeys, aValues, '--password-store', 'basic');
|
||||
end;
|
||||
|
||||
case FGTKVersion of
|
||||
gtkVersion3 : ReplaceSwitch(aKeys, aValues, '--gtk-version', '3');
|
||||
gtkVersion4 : ReplaceSwitch(aKeys, aValues, '--gtk-version', '4');
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
// The list of features you can enable is here :
|
||||
|
Reference in New Issue
Block a user