Index: widgets/text/e-text.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/text/e-text.c,v
retrieving revision 1.168
diff -u -p -r1.168 e-text.c
--- widgets/text/e-text.c	30 Jan 2006 12:28:43 -0000	1.168
+++ widgets/text/e-text.c	11 May 2006 03:03:42 -0000
@@ -1490,7 +1490,8 @@ e_text_draw (GnomeCanvasItem *item, GdkD
 	}
 
 
-	insert_preedit_text (text);	
+	if (text->im_context_signals_registered)
+		insert_preedit_text (text);
 
 	if (!pango_layout_get_text (text->layout))
 		return;
@@ -2202,7 +2203,8 @@ e_text_event (GnomeCanvasItem *item, Gdk
 									      G_SIGNAL_MATCH_DATA,
                                                                              0, 0, NULL,
                                                                              NULL, save_text);
-                                       save_text->im_context_signals_registered = FALSE;
+					save_text->im_context_signals_registered = FALSE;
+					reset_layout (save_text);
                                 }
 
 				if (text->im_context) {
@@ -3848,6 +3850,7 @@ e_text_preedit_changed_cb (GtkIMContext 
 					NULL, NULL);
 
 	etext->preedit_len = strlen (preedit_string);
+	g_free (preedit_string);
 
 	g_signal_emit (etext, e_text_signals[E_TEXT_KEYPRESS], 0, 0, 0);
 }
