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

Unified Diff: views/widget/native_widget_gtk.cc

Issue 7744029: Possible fix for the issue that keyboard doesn't show up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git-try Created 9 years, 4 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 | views/widget/native_widget_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/native_widget_gtk.cc
diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc
index e303aef87080c0c33d7b51ab15e6beacd9768207..75778c9216a4423a18ff41c47a189d2da1780148 100644
--- a/views/widget/native_widget_gtk.cc
+++ b/views/widget/native_widget_gtk.cc
@@ -974,8 +974,6 @@ InputMethod* NativeWidgetGtk::CreateInputMethod() {
InputMethod* input_method = new InputMethodGtk(this);
#endif
input_method->Init(GetWidget());
- if (has_focus_)
- input_method->OnFocus();
return input_method;
}
// GTK's textfield handles IME.
@@ -1643,7 +1641,7 @@ gboolean NativeWidgetGtk::OnFocusIn(GtkWidget* widget, GdkEventFocus* event) {
return false;
// Only top-level Widget should have an InputMethod instance.
- InputMethod* input_method = GetWidget()->GetInputMethodDirect();
+ InputMethod* input_method = GetWidget()->GetInputMethod();
if (input_method)
input_method->OnFocus();
@@ -1667,7 +1665,7 @@ gboolean NativeWidgetGtk::OnFocusOut(GtkWidget* widget, GdkEventFocus* event) {
return false;
// Only top-level Widget should have an InputMethod instance.
- InputMethod* input_method = GetWidget()->GetInputMethodDirect();
+ InputMethod* input_method = GetWidget()->GetInputMethod();
if (input_method)
input_method->OnBlur();
return false;
@@ -1675,7 +1673,7 @@ gboolean NativeWidgetGtk::OnFocusOut(GtkWidget* widget, GdkEventFocus* event) {
gboolean NativeWidgetGtk::OnEventKey(GtkWidget* widget, GdkEventKey* event) {
KeyEvent key(reinterpret_cast<NativeEvent>(event));
- InputMethod* input_method = GetWidget()->GetInputMethodDirect();
+ InputMethod* input_method = GetWidget()->GetInputMethod();
if (input_method)
input_method->DispatchKeyEvent(key);
else
« no previous file with comments | « no previous file | views/widget/native_widget_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698