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

Unified Diff: views/ime/input_method_ibus.cc

Issue 7217008: Use input method to control visibility of virtual keyboard (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Update Created 9 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
Index: views/ime/input_method_ibus.cc
diff --git a/views/ime/input_method_ibus.cc b/views/ime/input_method_ibus.cc
index 958e3dfdcfb0aa9c6e40d5cbfc4848e5507e886f..5dbdf202baf3370dd368cea0d9c7d6b51a325388 100644
--- a/views/ime/input_method_ibus.cc
+++ b/views/ime/input_method_ibus.cc
@@ -369,6 +369,7 @@ void InputMethodIBus::DispatchKeyEvent(const KeyEvent& key) {
}
void InputMethodIBus::OnTextInputTypeChanged(View* view) {
+ InputMethodBase::OnTextInputTypeChanged(view);
if (context_ && IsViewFocused(view)) {
ResetContext();
UpdateContextFocusState();
@@ -413,7 +414,9 @@ base::i18n::TextDirection InputMethodIBus::GetInputTextDirection() {
}
bool InputMethodIBus::IsActive() {
- return context_ != NULL;
+ // We always need to receive TextInputTypeChanged signal,
+ // so just return true here.
+ return true;
}
// static
@@ -582,7 +585,7 @@ void InputMethodIBus::ResetContext() {
}
void InputMethodIBus::UpdateContextFocusState() {
- if (!context_) {
+ if (!context_ || !widget_focused()) {
context_focused_ = false;
UpdateFakeContextFocusState();
return;

Powered by Google App Engine
This is Rietveld 408576698