| 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 9d43d8523a85811d2a7569d0a9463abc95c59f48..f638c2957549f58821593afd48067ac5ac0f3dad 100644
|
| --- a/ui/base/ime/input_method_base.cc
|
| +++ b/ui/base/ime/input_method_base.cc
|
| @@ -58,6 +58,12 @@ TextInputClient* InputMethodBase::GetTextInputClient() const {
|
| return text_input_client_;
|
| }
|
|
|
| +void InputMethodBase::SetCoveredBounds(const gfx::Rect& new_bounds) {
|
| + covered_bounds_ = new_bounds;
|
| + if (text_input_client_)
|
| + text_input_client_->EnsureCaretOutOfRect(covered_bounds_);
|
| +}
|
| +
|
| void InputMethodBase::OnTextInputTypeChanged(const TextInputClient* client) {
|
| if (!IsTextInputClientFocused(client))
|
| return;
|
| @@ -147,6 +153,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_->EnsureCaretOutOfRect(covered_bounds_);
|
| }
|
|
|
| std::vector<gfx::Rect> InputMethodBase::GetCompositionBounds(
|
|
|