Index: views/widget/native_widget_aura.cc |
diff --git a/views/widget/native_widget_aura.cc b/views/widget/native_widget_aura.cc |
index b1adcea43c75e912dd48ab8f94ef9e258be32d8b..a614c729f894e80984a89478c35359d28a4f6d07 100644 |
--- a/views/widget/native_widget_aura.cc |
+++ b/views/widget/native_widget_aura.cc |
@@ -446,7 +446,10 @@ gfx::Rect NativeWidgetAura::GetWorkAreaBoundsInScreen() const { |
// NativeWidgetAura, views::InputMethodDelegate implementation: |
void NativeWidgetAura::DispatchKeyEventPostIME(const KeyEvent& key) { |
- delegate_->OnKeyEvent(key); |
+ if (delegate_->OnKeyEvent(key)) |
+ return; |
+ if (key.type() == ui::ET_KEY_PRESSED && GetWidget()->GetFocusManager()) |
Ben Goodger (Google)
2011/10/26 19:06:04
Is it standard practice to dispatch accelerators/t
mazda
2011/10/27 13:05:05
I think so.
While users compose text with IME, the
|
+ GetWidget()->GetFocusManager()->OnKeyEvent(key); |
} |
//////////////////////////////////////////////////////////////////////////////// |
@@ -464,7 +467,8 @@ void NativeWidgetAura::OnFocus() { |
InputMethod* input_method = widget->GetInputMethod(); |
input_method->OnFocus(); |
// See description of got_initial_focus_in_ for details on this. |
- widget->GetFocusManager()->RestoreFocusedView(); |
+ // TODO(mazda): Investigate this is actually necessary. |
+ // widget->GetFocusManager()->RestoreFocusedView(); |
} |
delegate_->OnNativeFocus(window_); |
} |