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

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: 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..0e365ea5ca214ae7b98c681c5b49ef7cab0b0ddd 100644
--- a/chrome/browser/renderer_host/gtk_im_context_wrapper.cc
+++ b/chrome/browser/renderer_host/gtk_im_context_wrapper.cc
@@ -455,13 +455,18 @@ void GtkIMContextWrapper::HandleCommit(const string16& text) {
}
void GtkIMContextWrapper::HandlePreeditStart() {
- is_composing_text_ = true;
+ // Ignore preedit related signals triggered by CancelComposition() method.
+ if (!suppress_next_commit_)
satorux1 2010/11/24 01:56:05 You might want to make the code look like line 466
+ 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