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

Unified Diff: ui/base/ime/input_method_tsf.cc

Issue 17546002: Support SetFocusedTextInputClient(NULL) in InputMethodTSF (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comment Created 7 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_tsf.cc
diff --git a/ui/base/ime/input_method_tsf.cc b/ui/base/ime/input_method_tsf.cc
index ab720f11da4a6600dced99fdf7eafba0f9b5c80c..65699ce8c575166faecea9dc982f3ae6c4985afe 100644
--- a/ui/base/ime/input_method_tsf.cc
+++ b/ui/base/ime/input_method_tsf.cc
@@ -89,6 +89,11 @@ void InputMethodTSF::SetFocusedTextInputClient(TextInputClient* client) {
if (IsWindowFocused(client)) {
ui::TSFBridge::GetInstance()->SetFocusedClient(
GetAttachedWindowHandle(client), client);
+ } else if (!client) {
+ // SetFocusedTextInputClient(NULL) must be interpreted as
+ // "Remove the attached client".
+ ui::TSFBridge::GetInstance()->RemoveFocusedClient(
+ ui::TSFBridge::GetInstance()->GetFocusedTextInputClient());
}
InputMethodWin::SetFocusedTextInputClient(client);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698