Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager_impl.cc

Issue 10917061: Fix preedit handling on IME switching. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Revise comments Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698