From d4b4e5fd35357fa2c88cbb3d3389011328bffe27 Mon Sep 17 00:00:00 2001 From: amaitland Date: Wed, 13 May 2015 09:32:50 +1000 Subject: [PATCH] Manually apply merge changes from `master` to ManagedCefBrowserAdapter as it's now split into .h and .cpp, so can't auto merge changes --- CefSharp.Core/ManagedCefBrowserAdapter.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.cpp b/CefSharp.Core/ManagedCefBrowserAdapter.cpp index 3d546cb6c..1c87d0411 100644 --- a/CefSharp.Core/ManagedCefBrowserAdapter.cpp +++ b/CefSharp.Core/ManagedCefBrowserAdapter.cpp @@ -10,11 +10,12 @@ void ManagedCefBrowserAdapter::CreateOffscreenBrowser(IntPtr windowHandle, Brows auto hwnd = static_cast(windowHandle.ToPointer()); CefWindowInfo window; - window.SetAsWindowless(hwnd, TRUE); + auto transparent = browserSettings->OffScreenTransparentBackground->GetValueOrDefault(true); + window.SetAsWindowless(hwnd, transparent); CefString addressNative = StringUtils::ToNative(address); if (!CefBrowserHost::CreateBrowser(window, _clientAdapter.get(), addressNative, - *(CefBrowserSettings*)browserSettings->_internalBrowserSettings, NULL)) + *browserSettings->_browserSettings, NULL)) { throw gcnew InvalidOperationException("Failed to create offscreen browser. Call Cef.Initialize() first."); } @@ -569,7 +570,7 @@ void ManagedCefBrowserAdapter::CreateBrowser(BrowserSettings^ browserSettings, I CefString addressNative = StringUtils::ToNative(address); CefBrowserHost::CreateBrowser(window, _clientAdapter.get(), addressNative, - *(CefBrowserSettings*)browserSettings->_internalBrowserSettings, NULL); + *browserSettings->_browserSettings, NULL); } void ManagedCefBrowserAdapter::Resize(int width, int height)