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; |