From ad3f7d9653f6af8579f37c93d3afd7001c28dc80 Mon Sep 17 00:00:00 2001 From: 8 Date: Sat, 9 Dec 2000 01:04:54 +0000 Subject: [PATCH] make need_im_reset flag effective to avoid reset_ic operation being done 2000-12-08 * gtk/gtktextview.c (gtk_text_view_reset_im_context): * gtk/gtkentry.c (gtk_entry_reset_im_context): make need_im_reset flag effective to avoid reset_ic operation being done repeatedly. --- gtk/gtkentry.c | 7 ++++--- gtk/gtktextview.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 5256278144..766b999735 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -1866,9 +1866,10 @@ static void gtk_entry_reset_im_context (GtkEntry *entry) { if (entry->need_im_reset) - entry->need_im_reset = 0; - - gtk_im_context_reset (entry->im_context); + { + entry->need_im_reset = 0; + gtk_im_context_reset (entry->im_context); + } } static gint diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index c17b3ab0a9..4bcd9bdabc 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -3860,9 +3860,10 @@ static void gtk_text_view_reset_im_context (GtkTextView *text_view) { if (text_view->need_im_reset) - text_view->need_im_reset = 0; - - gtk_im_context_reset (text_view->im_context); + { + text_view->need_im_reset = 0; + gtk_im_context_reset (text_view->im_context); + } } /*