| Index: ui/views/mus/native_widget_mus.cc
|
| diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc
|
| index bbcc75d19d0c9b3c80ace25e087a68a838be81a9..68b98f9ae53e9dde3ab376a480e507587bc9058f 100644
|
| --- a/ui/views/mus/native_widget_mus.cc
|
| +++ b/ui/views/mus/native_widget_mus.cc
|
| @@ -14,6 +14,7 @@
|
| #include "ui/aura/env.h"
|
| #include "ui/aura/layout_manager.h"
|
| #include "ui/aura/window.h"
|
| +#include "ui/aura/window_property.h"
|
| #include "ui/base/hit_test.h"
|
| #include "ui/compositor/clip_transform_recorder.h"
|
| #include "ui/compositor/paint_recorder.h"
|
| @@ -29,9 +30,13 @@
|
| #include "ui/wm/core/capture_controller.h"
|
| #include "ui/wm/core/focus_controller.h"
|
|
|
| +DECLARE_WINDOW_PROPERTY_TYPE(mus::Window*);
|
| +
|
| namespace views {
|
| namespace {
|
|
|
| +DEFINE_WINDOW_PROPERTY_KEY(mus::Window*, kMusWindow, nullptr);
|
| +
|
| WindowManagerClientAreaInsets* window_manager_client_area_insets = nullptr;
|
|
|
| // TODO: figure out what this should be.
|
| @@ -269,6 +274,7 @@ void NativeWidgetMus::InitNativeWidget(const Widget::InitParams& params) {
|
| new WindowTreeHostMus(shell_, this, window_, surface_type_));
|
| window_tree_host_->InitHost();
|
| aura::Env::GetInstance()->set_context_factory(default_context_factory);
|
| + window_tree_host_->window()->SetProperty(kMusWindow, window_);
|
|
|
| focus_client_.reset(new wm::FocusController(new FocusRulesImpl));
|
|
|
| @@ -289,8 +295,16 @@ void NativeWidgetMus::InitNativeWidget(const Widget::InitParams& params) {
|
| content_->Show();
|
| content_->SetTransparent(true);
|
| content_->SetFillsBoundsCompletely(false);
|
| -
|
| window_tree_host_->window()->AddChild(content_);
|
| +
|
| + // Set-up transiency if appropriate.
|
| + if (params.parent && !params.child) {
|
| + aura::Window* parent_root = params.parent->GetRootWindow();
|
| + mus::Window* parent_mus = parent_root->GetProperty(kMusWindow);
|
| + if (parent_mus)
|
| + parent_mus->AddTransientWindow(window_);
|
| + }
|
| +
|
| // TODO(beng): much else, see [Desktop]NativeWidgetAura.
|
|
|
| native_widget_delegate_->OnNativeWidgetCreated(false);
|
|
|