diff options
Diffstat (limited to 'ui/aura/window.cc')
-rw-r--r-- | ui/aura/window.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/aura/window.cc b/ui/aura/window.cc index 5502f5d..a47d897 100644 --- a/ui/aura/window.cc +++ b/ui/aura/window.cc @@ -41,6 +41,7 @@ Window::Window(WindowDelegate* delegate) parent_(NULL), transient_parent_(NULL), id_(-1), + transparent_(false), user_data_(NULL), stops_event_propagation_(false), ignore_events_(false) { @@ -100,6 +101,7 @@ void Window::Init(ui::Layer::LayerType layer_type) { layer_->SetVisible(false); layer_->set_delegate(this); UpdateLayerName(name_); + layer_->SetFillsBoundsOpaquely(!transparent_); RootWindow::GetInstance()->WindowInitialized(this); } @@ -117,6 +119,12 @@ void Window::SetName(const std::string& name) { UpdateLayerName(name_); } +void Window::SetTransparent(bool transparent) { + // Cannot change transparent flag after the window is initialized. + DCHECK(!layer()); + transparent_ = transparent; +} + ui::Layer* Window::AcquireLayer() { return layer_.release(); } |