Chromium Code Reviews| Index: ui/base/ime/input_method_auralinux.cc |
| diff --git a/ui/base/ime/input_method_auralinux.cc b/ui/base/ime/input_method_auralinux.cc |
| index ca9931f06f777e215e9012f9da4b9f1e3bb9fdca..02aa5b8539704e41b96b3f0c3ffc59971e4abb5d 100644 |
| --- a/ui/base/ime/input_method_auralinux.cc |
| +++ b/ui/base/ime/input_method_auralinux.cc |
| @@ -46,6 +46,18 @@ bool InputMethodAuraLinux::OnUntranslatedIMEMessage( |
| void InputMethodAuraLinux::DispatchKeyEvent(ui::KeyEvent* event) { |
| DCHECK(event->type() == ET_KEY_PRESSED || event->type() == ET_KEY_RELEASED); |
| DCHECK(system_toplevel_window_focused()); |
| + if (!system_toplevel_window_focused()) { |
|
sky
2016/01/08 16:51:57
I think you should see if the toplevel is actually
Shu Chen
2016/01/09 01:46:02
Line 1530 of desktop_window_tree_host_x11.cc makes
|
| + LOG(ERROR) << "Key event got without the top-level window being activated."; |
| + GetLogCollector()->OutputLogs(); |
| + // There are random issues that the keyboard typing doesn't work. |
| + // The root cause might be the InputMethod::OnFocus() is not correctly |
| + // called when the top-level window is activated |
| + // (in DNWA::HandleActivationChanged). |
| + // Calls OnFocus here to unblock the keyboard typing. |
| + OnFocus(); |
| + } else { |
| + GetLogCollector()->ClearLogs(); |
| + } |
| // If no text input client, do nothing. |
| if (!GetTextInputClient()) { |