| Index: ui/base/ime/input_method_imm32.cc
|
| diff --git a/ui/base/ime/input_method_imm32.cc b/ui/base/ime/input_method_imm32.cc
|
| index 430be000864cd685076ecb11309820e12303b8be..2758ae98277ba6aa7560b1f730e188ee224fc2ce 100644
|
| --- a/ui/base/ime/input_method_imm32.cc
|
| +++ b/ui/base/ime/input_method_imm32.cc
|
| @@ -14,7 +14,7 @@ namespace ui {
|
| InputMethodIMM32::InputMethodIMM32(internal::InputMethodDelegate* delegate,
|
| HWND toplevel_window_handle)
|
| : InputMethodWin(delegate, toplevel_window_handle),
|
| - enabled_(false) {
|
| + enabled_(false), is_popup_open_(false) {
|
| }
|
|
|
| void InputMethodIMM32::OnFocus() {
|
| @@ -62,6 +62,10 @@ bool InputMethodIMM32::OnUntranslatedIMEMessage(
|
| original_result = OnDeadChar(
|
| event.message, event.wParam, event.lParam, &handled);
|
| break;
|
| + case WM_IME_NOTIFY:
|
| + original_result = OnImeNotify(
|
| + event.message, event.wParam, event.lParam, &handled);
|
| + break;
|
| default:
|
| NOTREACHED() << "Unknown IME message:" << event.message;
|
| break;
|
| @@ -108,6 +112,10 @@ void InputMethodIMM32::SetFocusedTextInputClient(TextInputClient* client) {
|
| InputMethodWin::SetFocusedTextInputClient(client);
|
| }
|
|
|
| +bool InputMethodIMM32::IsPopupOpen() const {
|
| + return is_popup_open_;
|
| +}
|
| +
|
| void InputMethodIMM32::OnWillChangeFocusedClient(
|
| TextInputClient* focused_before,
|
| TextInputClient* focused) {
|
| @@ -217,6 +225,25 @@ LRESULT InputMethodIMM32::OnImeEndComposition(UINT message,
|
| return 0;
|
| }
|
|
|
| +LRESULT InputMethodIMM32::OnImeNotify(UINT message,
|
| + WPARAM wparam,
|
| + LPARAM lparam,
|
| + BOOL* handled) {
|
| + *handled = FALSE;
|
| +
|
| + // Update |is_popup_open_|, whether a candidate window is open or not.
|
| + switch (wparam) {
|
| + case IMN_OPENCANDIDATE:
|
| + is_popup_open_ = true;
|
| + break;
|
| + case IMN_CLOSECANDIDATE:
|
| + is_popup_open_ = false;
|
| + break;
|
| + }
|
| +
|
| + return 0;
|
| +}
|
| +
|
| void InputMethodIMM32::ConfirmCompositionText() {
|
| if (!IsTextInputTypeNone()) {
|
| HWND attached_window = GetAttachedWindowHandle(GetTextInputClient());
|
|
|