changeset 14831:df37dc2b9bfb

(X_I18N_INHIBITED): New macro--define this instead of undefining HAVE_X_I18N. (x_window) [HAVE_X_I18N]: Set FRAME_XIM. [X_I18N_INHIBITED]: Set FRAME_XIM and FRAME_XIC to 0.
author Richard M. Stallman <rms@gnu.org>
date Mon, 18 Mar 1996 03:26:17 +0000
parents 34db919835d3
children 4d511dd9bfce
files src/xfns.c
diffstat 1 files changed, 23 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Mon Mar 18 03:20:06 1996 +0000
+++ b/src/xfns.c	Mon Mar 18 03:26:17 1996 +0000
@@ -44,7 +44,7 @@
 /* On some systems, the character-composition stuff is broken in X11R5.  */
 #if defined (HAVE_X11R5) && ! defined (HAVE_X11R6)
 #ifdef X11R5_INHIBIT_I18N
-#undef HAVE_X_I18N
+#define X_I18N_INHIBITED
 #endif
 #endif
 
@@ -2656,6 +2656,7 @@
   XSetClassHint (FRAME_X_DISPLAY (f), XtWindow (shell_widget), &class_hints);
 
 #ifdef HAVE_X_I18N
+#ifndef X_I18N_INHIBITED
   { 
     XIM xim;
     XIC xic = NULL;
@@ -2671,11 +2672,19 @@
 			 NULL);
 
 	if (xic == 0)
-	  XCloseIM (xim);
+	  {
+	    XCloseIM (xim);
+	    xim = NULL;
+	  }
       }
+    FRAME_XIM (f) = xim;
     FRAME_XIC (f) = xic;
   }
-#endif
+#else /* X_I18N_INHIBITED */
+  FRAME_XIM (f) = 0;
+  FRAME_XIC (f) = 0;
+#endif /* X_I18N_INHIBITED */
+#endif /* HAVE_X_I18N */
 
   f->output_data.x->wm_hints.input = True;
   f->output_data.x->wm_hints.flags |= InputHint;
@@ -2769,6 +2778,7 @@
 		     FRAME_X_DISPLAY_INFO (f)->visual,
 		     attribute_mask, &attributes);
 #ifdef HAVE_X_I18N
+#ifndef X_I18N_INHIBITED
   { 
     XIM xim;
     XIC xic = NULL;
@@ -2784,12 +2794,20 @@
 			 NULL);
 
 	if (!xic)
-	  XCloseIM (xim);
+	  {
+	    XCloseIM (xim);
+	    xim = NULL;
+	  }
       }
 
+    FRAME_XIM (f) = xim;
     FRAME_XIC (f) = xic;
   }
-#endif
+#else /* X_I18N_INHIBITED */
+  FRAME_XIM (f) = 0;
+  FRAME_XIC (f) = 0;
+#endif /* X_I18N_INHIBITED */
+#endif /* HAVE_X_I18N */
 
   validate_x_resource_name ();