| Index: ui/base/ime/input_method_base.cc
|
| diff --git a/ui/base/ime/input_method_base.cc b/ui/base/ime/input_method_base.cc
|
| index 492d7f9a5e06700b527e90f9f6a60b9ae97c6503..45dc338d718f3b0d7e16b875c2b758148dab8d7b 100644
|
| --- a/ui/base/ime/input_method_base.cc
|
| +++ b/ui/base/ime/input_method_base.cc
|
| @@ -63,6 +63,12 @@ TextInputClient* InputMethodBase::GetTextInputClient() const {
|
| return text_input_client_;
|
| }
|
|
|
| +void InputMethodBase::SetOnScreenKeyboardBounds(const gfx::Rect& new_bounds) {
|
| + keyboard_bounds_ = new_bounds;
|
| + if (text_input_client_)
|
| + text_input_client_->EnsureCaretNotInRect(keyboard_bounds_);
|
| +}
|
| +
|
| void InputMethodBase::OnTextInputTypeChanged(const TextInputClient* client) {
|
| if (!IsTextInputClientFocused(client))
|
| return;
|
| @@ -152,6 +158,13 @@ void InputMethodBase::SetFocusedTextInputClientInternal(
|
| text_input_client_ = client; // nullptr allowed.
|
| OnDidChangeFocusedClient(old, client);
|
| NotifyTextInputStateChanged(text_input_client_);
|
| +
|
| + // Restore old focused window if moved.
|
| + if (old)
|
| + old->OnClientFocusLost();
|
| + // Move new focused window if necessary.
|
| + if (text_input_client_)
|
| + text_input_client_->EnsureCaretNotInRect(keyboard_bounds_);
|
| }
|
|
|
| std::vector<gfx::Rect> InputMethodBase::GetCompositionBounds(
|
|
|