Chromium Code Reviews| Index: chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
| diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
| index 455e785d4f406713a5913b297157ea23ba05e006..485fea9ba926fc04a985b8eb01da16a53e94f489 100644 |
| --- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
| +++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
| @@ -248,7 +248,17 @@ void InputMethodManagerImpl::ChangeInputMethodInternal( |
| FOR_EACH_OBSERVER(InputMethodManager::Observer, |
| observers_, |
| InputMethodPropertyChanged(this)); |
| - ibus_controller_->Reset(); |
| + // Hack for fixing http://crbug.com/p/12798 |
|
Yusuke Sato
2012/09/04 17:49:53
crosbug
please also fix the BUG= line.
Seigo Nonaka
2012/09/04 18:08:48
Opps, thanks.
Done.
On 2012/09/04 17:49:53, Yusuke
|
| + // We should notify IME switching to ibus-daemon, otherwise |
| + // IBusPreeditFocusMode does not work. To achieve it, change engine to |
| + // itself if the next engine is XKB layout. |
| + const std::string current_input_method_id = current_input_method_.id(); |
| + if (current_input_method_id.empty() || |
| + InputMethodUtil::IsKeyboardLayout(current_input_method_id)) { |
| + ibus_controller_->Reset(); |
| + } else { |
| + ibus_controller_->ChangeInputMethod(current_input_method_id); |
| + } |
| } else { |
| ibus_controller_->ChangeInputMethod(input_method_id_to_switch); |
| } |