Skip to content

Commit

Permalink
support for alpha on mac and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Benvie committed Jul 10, 2012
1 parent 57e6c38 commit ccc59cf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@
'link_settings': {
'libraries': [
'GdiPlus.lib',
'dwmapi.lib',
'<(module_root_dir)/deps/cef/lib/Release/libcef.lib',
'<(module_root_dir)/build/Release/lib/libcef_dll_wrapper.node'
],
Expand Down
7 changes: 5 additions & 2 deletions src/includes/cef_base_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@
CefBrowserSettings browser_settings;

browser_settings.web_security_disabled = settings->getBoolean("disableSecurity",false);

if (settings->getBoolean("alphaCompositing", false)) {
window_info.SetTransparentPainting(TRUE);
}

int width = settings->getNumber("width",800);
int height = settings->getNumber("height",600);

window_info.SetAsChild(ParentWidget,0,0,width,height);

CefBrowser::CreateBrowser(window_info,
Expand Down
6 changes: 5 additions & 1 deletion src/includes/cef_base_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ void CefBase::AddWebView(CefWindowHandle hWndParent,RECT windowRect,char* url,Se
CefWindowInfo window_info;
CefBrowserSettings browserSettings;

browserSettings.web_security_disabled = settings->getBoolean("disableSecurity",false);
browserSettings.web_security_disabled = settings->getBoolean("disableSecurity", false);

window_info.SetAsChild(hWndParent, windowRect);
if (settings->getBoolean("alpha", false)) {
window_info.SetTransparentPainting(true);
}


CefBrowser::CreateBrowser(window_info,
static_cast<CefRefPtr<CefClient> >(g_handler),
Expand Down

0 comments on commit ccc59cf

Please sign in to comment.