| Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
| diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
| index 7974e6e019457a647b9824ccc3c0c5ec01a3a9b0..d7347d008257c90ea2aa568c9c466cebf935ec6e 100644
|
| --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
| +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
| @@ -256,7 +256,6 @@
|
| native_widget_delegate_(delegate),
|
| last_drop_operation_(ui::DragDropTypes::DRAG_NONE),
|
| restore_focus_on_activate_(false),
|
| - restore_focus_on_window_focus_(false),
|
| cursor_(gfx::kNullCursor),
|
| widget_type_(Widget::InitParams::TYPE_WINDOW) {
|
| aura::client::SetFocusChangeObserver(content_window_, this);
|
| @@ -1081,23 +1080,15 @@
|
| native_widget_delegate_->OnNativeFocus(lost_focus);
|
|
|
| // If focus is moving from a descendant Window to |content_window_| then
|
| - // native activation hasn't changed. Still, the InputMethod and FocusManager
|
| - // must be informed of the Window focus change.
|
| + // native activation hasn't changed. We still need to inform the InputMethod
|
| + // we've been focused though.
|
| InputMethod* input_method = GetWidget()->GetInputMethod();
|
| if (input_method)
|
| input_method->OnFocus();
|
| -
|
| - if (restore_focus_on_window_focus_) {
|
| - restore_focus_on_window_focus_ = false;
|
| - GetWidget()->GetFocusManager()->RestoreFocusedView();
|
| - }
|
| } else if (content_window_ == lost_focus) {
|
| desktop_window_tree_host_->OnNativeWidgetBlur();
|
| - native_widget_delegate_->OnNativeBlur(gained_focus);
|
| -
|
| - DCHECK(!restore_focus_on_window_focus_);
|
| - restore_focus_on_window_focus_ = true;
|
| - GetWidget()->GetFocusManager()->StoreFocusedView(false);
|
| + native_widget_delegate_->OnNativeBlur(
|
| + aura::client::GetFocusClient(content_window_)->GetFocusedWindow());
|
| }
|
| }
|
|
|
|
|