Handle transparent WebContents in api::BrowserWindow
This commit is contained in:
parent
c611eb061d
commit
c87fc2426d
2 changed files with 5 additions and 5 deletions
|
@ -30,6 +30,7 @@
|
|||
#include "native_mate/constructor.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
#include "ui/gl/gpu_switching_manager.h"
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
#include "atom/browser/native_window_views.h"
|
||||
|
@ -155,6 +156,10 @@ void BrowserWindow::Init(v8::Isolate* isolate,
|
|||
web_contents->SetOwnerWindow(window_.get());
|
||||
window_->set_is_offscreen_dummy(api_web_contents_->IsOffScreen());
|
||||
|
||||
// Tell the content module to initialize renderer widget with transparent
|
||||
// mode.
|
||||
ui::GpuSwitchingManager::SetTransparent(window_->transparent());
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
// Sets the window icon.
|
||||
mate::Handle<NativeImage> icon;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue