| Index: ui/base/ime/remote_input_method_win.cc
|
| diff --git a/ui/base/ime/remote_input_method_win.cc b/ui/base/ime/remote_input_method_win.cc
|
| index 1a589bb0668f6b235b24f755093c2812abd512fb..b15ca13931d08575fbc08ecf3eb8e763f9b6024c 100644
|
| --- a/ui/base/ime/remote_input_method_win.cc
|
| +++ b/ui/base/ime/remote_input_method_win.cc
|
| @@ -183,9 +183,7 @@ class RemoteInputMethodWin : public InputMethod,
|
| if (event->HasNativeEvent()) {
|
| const base::NativeEvent& native_key_event = event->native_event();
|
| if (native_key_event.message == WM_CHAR && text_input_client_) {
|
| - text_input_client_->InsertChar(
|
| - static_cast<base::char16>(native_key_event.wParam),
|
| - ui::GetModifiersFromKeyState());
|
| + pending_char_events_.push_back(native_key_event);
|
| event->StopPropagation();
|
| }
|
| return;
|
| @@ -200,8 +198,19 @@ class RemoteInputMethodWin : public InputMethod,
|
| event->StopPropagation();
|
| return;
|
| }
|
| - if (delegate_)
|
| + if (delegate_) {
|
| ignore_result(delegate_->DispatchKeyEventPostIME(event));
|
| + if (text_input_client_ && pending_char_events_.size()) {
|
| + for (size_t i = 0; i < pending_char_events_.size(); ++i) {
|
| + const base::NativeEvent& native_key_event = pending_char_events_[i];
|
| + text_input_client_->InsertChar(
|
| + static_cast<base::char16>(pending_char_events_[i].wParam),
|
| + event->flags());
|
| + }
|
| + event->StopPropagation();
|
| + }
|
| + }
|
| + pending_char_events_.clear();
|
| }
|
|
|
| void OnTextInputTypeChanged(const TextInputClient* client) override {
|
| @@ -344,6 +353,7 @@ class RemoteInputMethodWin : public InputMethod,
|
| bool is_candidate_popup_open_;
|
| bool is_ime_;
|
| LANGID langid_;
|
| + std::vector<base::NativeEvent> pending_char_events_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(RemoteInputMethodWin);
|
| };
|
|
|