changeset 29948:bf5da5d2d690

(xim_initialize) [!USE_XIM]: Don't set up the display info for XIM. (xim_open_dpy): Likewise. (xim_close_dpy): Don't free the display info's XIM.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 26 Jun 2000 15:39:55 +0000
parents b7556fa4c05b
children abd4c37731d3
files src/xterm.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Mon Jun 26 15:39:25 2000 +0000
+++ b/src/xterm.c	Mon Jun 26 15:39:55 2000 +0000
@@ -11094,6 +11094,7 @@
      struct x_display_info *dpyinfo;
      char *resource_name;
 {
+#ifdef USE_XIM
   XIM xim;
 
   xim = XOpenIM (dpyinfo->display, dpyinfo->xrdb, resource_name, EMACS_CLASS);
@@ -11115,6 +11116,10 @@
       XSetIMValues (xim, XNDestroyCallback, &destroy, NULL);
 #endif
     }
+  
+#else /* not USE_XIM */
+  dpyinfo->xim = NULL;
+#endif /* not USE_XIM */
 }
 
 
@@ -11188,6 +11193,7 @@
      struct x_display_info *dpyinfo;
      char *resource_name;
 {
+#ifdef USE_XIM
 #ifdef HAVE_X11R6_XIM
   struct xim_inst_t *xim_inst;
   int len;
@@ -11209,6 +11215,10 @@
   dpyinfo->xim = NULL;
   xim_open_dpy (dpyinfo, resource_name);
 #endif /* not HAVE_X11R6_XIM */
+  
+#else /* not USE_XIM */
+  dpyinfo->xim = NULL;
+#endif /* not USE_XIM */
 }
 
 
@@ -11218,6 +11228,7 @@
 xim_close_dpy (dpyinfo)
      struct x_display_info *dpyinfo;
 {
+#ifdef USE_XIM
 #ifdef HAVE_X11R6_XIM
   XUnregisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb,
 				    NULL, EMACS_CLASS,
@@ -11226,6 +11237,7 @@
   XCloseIM (dpyinfo->xim);
   dpyinfo->xim = NULL;
   XFree (dpyinfo->xim_styles);
+#endif /* USE_XIM */
 }
 
 #endif /* not HAVE_X11R6_XIM */