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

Unified Diff: chrome/browser/renderer_host/gtk_im_context_wrapper.cc

Issue 5372001: [cros] Fix two issues related to gtk im context support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update according to review feedback. Created 10 years, 1 month 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/renderer_host/render_widget_host_view_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/gtk_im_context_wrapper.cc
diff --git a/chrome/browser/renderer_host/gtk_im_context_wrapper.cc b/chrome/browser/renderer_host/gtk_im_context_wrapper.cc
index adc81b32eae0a0ee668d830d0823cc026941373c..25ec4f0b7990af3fe12f07fdf39e31b185e471ba 100644
--- a/chrome/browser/renderer_host/gtk_im_context_wrapper.cc
+++ b/chrome/browser/renderer_host/gtk_im_context_wrapper.cc
@@ -455,13 +455,19 @@ void GtkIMContextWrapper::HandleCommit(const string16& text) {
}
void GtkIMContextWrapper::HandlePreeditStart() {
+ // Ignore preedit related signals triggered by CancelComposition() method.
+ if (suppress_next_commit_)
+ return;
is_composing_text_ = true;
}
void GtkIMContextWrapper::HandlePreeditChanged(const gchar* text,
PangoAttrList* attrs,
int cursor_position) {
- suppress_next_commit_ = false;
+ // Ignore preedit related signals triggered by CancelComposition() method.
+ if (suppress_next_commit_)
+ return;
+
// Don't set is_preedit_changed_ to false if there is no change, because
// this handler might be called multiple times with the same data.
is_preedit_changed_ = true;
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698