mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-15 15:55:56 +01:00
Added the TChromium.DefaultWindowInfoExStyle property
DefaultWindowInfoExStyle is used to initialize the browser window with that ExStyle. In some cases a focus issue may be fixed if we use the WS_EX_NOACTIVATE value instead of 0 but it may have some side effects. This could be used to fix issue #282
This commit is contained in:
parent
7e3e8bad24
commit
d55d7c0733
@ -129,13 +129,14 @@ type
|
||||
FDragDropManager : TCEFDragAndDropMgr;
|
||||
FDropTargetWnd : HWND;
|
||||
{$ENDIF}
|
||||
FDragAndDropInitialized : boolean;
|
||||
FWebRTCIPHandlingPolicy : TCefWebRTCHandlingPolicy;
|
||||
FWebRTCMultipleRoutes : TCefState;
|
||||
FWebRTCNonProxiedUDP : TCefState;
|
||||
FAcceptLanguageList : ustring;
|
||||
FAcceptCookies : TCefCookiePref;
|
||||
FBlock3rdPartyCookies : boolean;
|
||||
FDragAndDropInitialized : boolean;
|
||||
FWebRTCIPHandlingPolicy : TCefWebRTCHandlingPolicy;
|
||||
FWebRTCMultipleRoutes : TCefState;
|
||||
FWebRTCNonProxiedUDP : TCefState;
|
||||
FAcceptLanguageList : ustring;
|
||||
FAcceptCookies : TCefCookiePref;
|
||||
FBlock3rdPartyCookies : boolean;
|
||||
FDefaultWindowInfoExStyle : cardinal;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
FOldBrowserCompWndPrc : TFNWndProc;
|
||||
@ -840,6 +841,7 @@ type
|
||||
property AcceptCookies : TCefCookiePref read FAcceptCookies write SetAcceptCookies;
|
||||
property Block3rdPartyCookies : boolean read FBlock3rdPartyCookies write SetBlock3rdPartyCookies;
|
||||
property MultiBrowserMode : boolean read FMultiBrowserMode write SetMultiBrowserMode;
|
||||
property DefaultWindowInfoExStyle : cardinal read FDefaultWindowInfoExStyle write FDefaultWindowInfoExStyle;
|
||||
|
||||
property WebRTCIPHandlingPolicy : TCefWebRTCHandlingPolicy read FWebRTCIPHandlingPolicy write SetWebRTCIPHandlingPolicy;
|
||||
property WebRTCMultipleRoutes : TCefState read FWebRTCMultipleRoutes write SetWebRTCMultipleRoutes;
|
||||
@ -1136,6 +1138,18 @@ begin
|
||||
FAcceptCookies := cpAllow;
|
||||
FBlock3rdPartyCookies := False;
|
||||
|
||||
//
|
||||
// Somo focus issues in CEF seem to be fixed when you use WS_EX_NOACTIVATE in
|
||||
// FDefaultWindowInfoExStyle to initialize the browser with that ExStyle but
|
||||
// it may cause side effects. Read these links for more information :
|
||||
// https://www.briskbard.com/forum/viewtopic.php?f=10&t=723
|
||||
// https://bitbucket.org/chromiumembedded/cef/issues/1856/branch-2526-cef-activates-browser-window
|
||||
//
|
||||
// It's necessary to set this property before the CreateBrowser call.
|
||||
//
|
||||
FDefaultWindowInfoExStyle := 0;
|
||||
//FDefaultWindowInfoExStyle := WS_EX_NOACTIVATE;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
FOldBrowserCompWndPrc := nil;
|
||||
FOldWidgetCompWndPrc := nil;
|
||||
@ -1783,7 +1797,7 @@ begin
|
||||
if FIsOSR then
|
||||
WindowInfoAsWindowless(FWindowInfo, ParentFormHandle, aWindowName)
|
||||
else
|
||||
WindowInfoAsChild(FWindowInfo, aParentHandle, aParentRect, aWindowName);
|
||||
WindowInfoAsChild(FWindowInfo, aParentHandle, aParentRect, aWindowName, FDefaultWindowInfoExStyle);
|
||||
{$ELSE}
|
||||
if FIsOSR then
|
||||
WindowInfoAsWindowless(FWindowInfo, 0)
|
||||
|
@ -2,7 +2,7 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 147,
|
||||
"InternalVersion" : 148,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "83.4.0.0"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user