mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-04-17 06:57:13 +02: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
@ -136,6 +136,7 @@ type
|
|||||||
FAcceptLanguageList : ustring;
|
FAcceptLanguageList : ustring;
|
||||||
FAcceptCookies : TCefCookiePref;
|
FAcceptCookies : TCefCookiePref;
|
||||||
FBlock3rdPartyCookies : boolean;
|
FBlock3rdPartyCookies : boolean;
|
||||||
|
FDefaultWindowInfoExStyle : cardinal;
|
||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
FOldBrowserCompWndPrc : TFNWndProc;
|
FOldBrowserCompWndPrc : TFNWndProc;
|
||||||
@ -840,6 +841,7 @@ type
|
|||||||
property AcceptCookies : TCefCookiePref read FAcceptCookies write SetAcceptCookies;
|
property AcceptCookies : TCefCookiePref read FAcceptCookies write SetAcceptCookies;
|
||||||
property Block3rdPartyCookies : boolean read FBlock3rdPartyCookies write SetBlock3rdPartyCookies;
|
property Block3rdPartyCookies : boolean read FBlock3rdPartyCookies write SetBlock3rdPartyCookies;
|
||||||
property MultiBrowserMode : boolean read FMultiBrowserMode write SetMultiBrowserMode;
|
property MultiBrowserMode : boolean read FMultiBrowserMode write SetMultiBrowserMode;
|
||||||
|
property DefaultWindowInfoExStyle : cardinal read FDefaultWindowInfoExStyle write FDefaultWindowInfoExStyle;
|
||||||
|
|
||||||
property WebRTCIPHandlingPolicy : TCefWebRTCHandlingPolicy read FWebRTCIPHandlingPolicy write SetWebRTCIPHandlingPolicy;
|
property WebRTCIPHandlingPolicy : TCefWebRTCHandlingPolicy read FWebRTCIPHandlingPolicy write SetWebRTCIPHandlingPolicy;
|
||||||
property WebRTCMultipleRoutes : TCefState read FWebRTCMultipleRoutes write SetWebRTCMultipleRoutes;
|
property WebRTCMultipleRoutes : TCefState read FWebRTCMultipleRoutes write SetWebRTCMultipleRoutes;
|
||||||
@ -1136,6 +1138,18 @@ begin
|
|||||||
FAcceptCookies := cpAllow;
|
FAcceptCookies := cpAllow;
|
||||||
FBlock3rdPartyCookies := False;
|
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}
|
{$IFDEF MSWINDOWS}
|
||||||
FOldBrowserCompWndPrc := nil;
|
FOldBrowserCompWndPrc := nil;
|
||||||
FOldWidgetCompWndPrc := nil;
|
FOldWidgetCompWndPrc := nil;
|
||||||
@ -1783,7 +1797,7 @@ begin
|
|||||||
if FIsOSR then
|
if FIsOSR then
|
||||||
WindowInfoAsWindowless(FWindowInfo, ParentFormHandle, aWindowName)
|
WindowInfoAsWindowless(FWindowInfo, ParentFormHandle, aWindowName)
|
||||||
else
|
else
|
||||||
WindowInfoAsChild(FWindowInfo, aParentHandle, aParentRect, aWindowName);
|
WindowInfoAsChild(FWindowInfo, aParentHandle, aParentRect, aWindowName, FDefaultWindowInfoExStyle);
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
if FIsOSR then
|
if FIsOSR then
|
||||||
WindowInfoAsWindowless(FWindowInfo, 0)
|
WindowInfoAsWindowless(FWindowInfo, 0)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"UpdateLazPackages" : [
|
"UpdateLazPackages" : [
|
||||||
{
|
{
|
||||||
"ForceNotify" : true,
|
"ForceNotify" : true,
|
||||||
"InternalVersion" : 147,
|
"InternalVersion" : 148,
|
||||||
"Name" : "cef4delphi_lazarus.lpk",
|
"Name" : "cef4delphi_lazarus.lpk",
|
||||||
"Version" : "83.4.0.0"
|
"Version" : "83.4.0.0"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user