Index: widgets/text/e-text.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/text/e-text.c,v
retrieving revision 1.173
diff -u -8 -p -r1.173 e-text.c
--- widgets/text/e-text.c	21 Jul 2006 05:47:37 -0000	1.173
+++ widgets/text/e-text.c	21 Jul 2006 11:17:42 -0000
@@ -2211,34 +2211,39 @@ e_text_event (GnomeCanvasItem *item, Gdk
 				 * Here when a new text widget comes into focus we can disconnect the 
 				 * old one.Shouldn't hurt much, as in worst case, save_text which should
 				 * be disconnected will be overwritten and we will have signal 
 			   	 * handlers connect to  multiple e-texts but with subsequent commit these 
 				 * should go away.
 				 */
 
 				if (save_text && save_text->im_context) {
+					/* notify the IM Context of save_text for focus change */
+					gtk_im_context_focus_out(save_text->im_context);
 					g_signal_handlers_disconnect_matched (save_text->im_context,
 									      G_SIGNAL_MATCH_DATA,
                                                                              0, 0, NULL,
                                                                              NULL, save_text);
                                        save_text->im_context_signals_registered = FALSE;
+                                       
                                 }
 
 				if (text->im_context) {
 					if (!text->im_context_signals_registered) {
 						g_signal_connect (text->im_context, "commit",
 								  G_CALLBACK (e_text_commit_cb), text);
 						g_signal_connect (text->im_context, "preedit_changed",
 								  G_CALLBACK (e_text_preedit_changed_cb), text);
 						g_signal_connect (text->im_context, "retrieve_surrounding",
 								  G_CALLBACK (e_text_retrieve_surrounding_cb), text);
 						g_signal_connect (text->im_context, "delete_surrounding",
 								  G_CALLBACK (e_text_delete_surrounding_cb), text);
 						text->im_context_signals_registered = TRUE;
+						/* get the current IM Context the focus */
+						gtk_im_context_focus_in(text->im_context);
 					}
 				}
 				start_editing (text);
 				text->show_cursor = FALSE; /* so we'll redraw and the cursor will be shown */
 			} else {
 				/* Incase we are not disconnecting the signals 
 				 * for text, we are saving text for 
 				 * disconnecting in the next focus_in.
