summaryrefslogtreecommitdiff
path: root/chromium/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc')
-rw-r--r--chromium/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chromium/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/chromium/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index da27f6dd704..cde45a41be5 100644
--- a/chromium/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/chromium/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -362,7 +362,7 @@ void DesktopNativeWidgetAura::HandleActivationChanged(bool active) {
View* view_for_activation = focus_manager->GetFocusedView()
? focus_manager->GetFocusedView()
: focus_manager->GetStoredFocusView();
- if (!view_for_activation) {
+ if (!view_for_activation || !view_for_activation->GetWidget()) {
view_for_activation = GetWidget()->GetRootView();
} else if (view_for_activation == focus_manager->GetStoredFocusView()) {
// When desktop native widget has modal transient child, we don't
@@ -413,7 +413,7 @@ void DesktopNativeWidgetAura::InitNativeWidget(
NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_);
content_window_->SetType(GetAuraWindowTypeForWidgetType(params.type));
content_window_->Init(params.layer_type);
- wm::SetShadowElevation(content_window_, wm::ShadowElevation::NONE);
+ wm::SetShadowElevation(content_window_, wm::kShadowElevationNone);
if (!desktop_window_tree_host_) {
if (params.desktop_window_tree_host) {