Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Unified Diff: ui/views/mus/desktop_window_tree_host_mus.cc

Issue 2724693002: mash: improves browser frame decorations (Closed)
Patch Set: merge Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mash/quick_launch/quick_launch.cc ('k') | ui/wm/core/shadow_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6efc8ffb2e1642b1ae3a9ce73c8e1705061c076f 100644
--- a/ui/views/mus/desktop_window_tree_host_mus.cc
+++ b/ui/views/mus/desktop_window_tree_host_mus.cc
@@ -276,9 +276,16 @@ 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 as otherwise the
+ // window is opaque and the client decorations drawn by the window manager
+ // would not be seen.
+ 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 +312,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);
« no previous file with comments | « mash/quick_launch/quick_launch.cc ('k') | ui/wm/core/shadow_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698