summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/views/widget/native_widget_aura.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 9113d79..4ad5826 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -567,6 +567,9 @@ void NativeWidgetAura::OnFocus() {
if (widget->is_top_level()) {
InputMethod* input_method = widget->GetInputMethod();
input_method->OnFocus();
+ // See description of got_initial_focus_in_ for details on this.
+ // TODO(mazda): Investigate this is actually necessary.
+ // widget->GetFocusManager()->RestoreFocusedView();
}
delegate_->OnNativeFocus(window_);
}
@@ -576,6 +579,7 @@ void NativeWidgetAura::OnBlur() {
if (widget->is_top_level()) {
InputMethod* input_method = widget->GetInputMethod();
input_method->OnBlur();
+ widget->GetFocusManager()->StoreFocusedView();
}
delegate_->OnNativeBlur(NULL);
}
@@ -630,14 +634,12 @@ bool NativeWidgetAura::ShouldActivate(aura::Event* event) {
}
void NativeWidgetAura::OnActivated() {
- GetWidget()->GetFocusManager()->RestoreFocusedView();
delegate_->OnNativeWidgetActivationChanged(true);
if (IsVisible() && GetWidget()->non_client_view())
GetWidget()->non_client_view()->SchedulePaint();
}
void NativeWidgetAura::OnLostActive() {
- GetWidget()->GetFocusManager()->StoreFocusedView();
delegate_->OnNativeWidgetActivationChanged(false);
if (IsVisible() && GetWidget()->non_client_view())
GetWidget()->non_client_view()->SchedulePaint();