Chromium Code Reviews| Index: ui/base/ime/input_method_win.cc |
| diff --git a/ui/base/ime/input_method_win.cc b/ui/base/ime/input_method_win.cc |
| index 56bbac1b3244b1618eeaa89001155b815223cdf6..ea3a1806d20a11d78ca768203c5deb500c9b2197 100644 |
| --- a/ui/base/ime/input_method_win.cc |
| +++ b/ui/base/ime/input_method_win.cc |
| @@ -262,6 +262,17 @@ LRESULT InputMethodWin::OnChar(HWND window_handle, |
| BOOL* handled) { |
| *handled = TRUE; |
| + if (!system_toplevel_window_focused()) { |
| + LOG(ERROR) << |
| + "Char message got without the top-level window being activated."; |
|
yukawa
2016/01/07 11:09:42
(optional) We can also log |GetActiveWindow() == t
Shu Chen
2016/01/08 02:04:11
I think ::GetActiveWindow() could return non-top-l
yukawa
2016/01/08 02:21:20
(just FYI) AFAIK it always returns a top-level win
Shu Chen
2016/01/08 09:00:16
Done.
|
| + // 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(); |
| + } |
| + |
| // We need to send character events to the focused text input client event if |
| // its text input type is ui::TEXT_INPUT_TYPE_NONE. |
| if (GetTextInputClient()) { |