Chromium Code Reviews| Index: ui/views/mus/desktop_window_tree_host_mus.cc |
| diff --git a/ui/views/mus/desktop_window_tree_host_mus.cc b/ui/views/mus/desktop_window_tree_host_mus.cc |
| index 3bd57d5dc174975b108ba1bb20130ecec810aab6..bdc12e227a91aa4fae2f0ae33a4b31bae696a856 100644 |
| --- a/ui/views/mus/desktop_window_tree_host_mus.cc |
| +++ b/ui/views/mus/desktop_window_tree_host_mus.cc |
| @@ -276,9 +276,15 @@ bool DesktopWindowTreeHostMus::ShouldSendClientAreaToServer() const { |
| void DesktopWindowTreeHostMus::Init(aura::Window* content_window, |
| const Widget::InitParams& params) { |
| - // Needed so we don't render over the non-client area the window manager |
| - // renders to. |
| - content_window->layer()->SetFillsBoundsOpaquely(false); |
| + // |TYPE_WINDOW| and |TYPE_PANEL| are forced to transparent so that the |
| + // window-manager draws the non-client area. |
|
James Cook
2017/03/02 21:00:01
Do we have to do it this way? I understand there's
sky
2017/03/02 21:28:42
I updated the comment. Any better?
As to performa
James Cook
2017/03/02 21:44:24
Better!
|
| + const bool transparent = |
| + params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW || |
| + params.type == Widget::InitParams::TYPE_WINDOW || |
| + params.type == Widget::InitParams::TYPE_PANEL; |
| + content_window->SetTransparent(transparent); |
| + window()->SetTransparent(transparent); |
| + |
| if (!params.bounds.IsEmpty()) |
| SetBoundsInDIP(params.bounds); |
| @@ -305,6 +311,9 @@ void DesktopWindowTreeHostMus::Init(aura::Window* content_window, |
| void DesktopWindowTreeHostMus::OnNativeWidgetCreated( |
| const Widget::InitParams& params) { |
| + window()->SetName(params.name); |
| + desktop_native_widget_aura_->content_window()->SetName( |
| + "DesktopNativeWidgetAura - content window"); |
| if (params.parent && params.parent->GetHost()) { |
| parent_ = static_cast<DesktopWindowTreeHostMus*>(params.parent->GetHost()); |
| parent_->children_.insert(this); |