summaryrefslogtreecommitdiffstats
path: root/ui/views/widget/native_widget_aura.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/views/widget/native_widget_aura.cc')
-rw-r--r--ui/views/widget/native_widget_aura.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 116d6f1..8b27a13 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -179,6 +179,7 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) {
root_window_.reset(new aura::RootWindow(bounds));
root_window_->SetEventFilter(
new aura::DesktopRootWindowEventFilter(root_window_.get()));
+ root_window_->AddRootWindowObserver(this);
aura::client::SetActivationClient(
root_window_.get(),
@@ -814,6 +815,13 @@ void NativeWidgetAura::OnWindowVisibilityChanged(bool visible) {
}
////////////////////////////////////////////////////////////////////////////////
+// NativeWidgetAura, aura::RootWindowObserver implementation:
+
+void NativeWidgetAura::OnRootWindowHostClosed(const aura::RootWindow* root) {
+ GetWidget()->Close();
+}
+
+////////////////////////////////////////////////////////////////////////////////
// NativeWidgetAura, aura::ActivationDelegate implementation:
bool NativeWidgetAura::ShouldActivate(const aura::Event* event) {