]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_delete_display): Move xim_close_dpy call to x_delete_terminal.
authorChong Yidong <cyd@stupidchicken.com>
Sat, 13 Dec 2008 22:09:09 +0000 (22:09 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 13 Dec 2008 22:09:09 +0000 (22:09 +0000)
(x_delete_terminal): Call xim_close_dpy.

src/xterm.c

index ffc03bc10e9ab1c315e5ec642cb148c097523181..c47bd5026f7c42f8f8883dd3400b4df1f89b9aef 100644 (file)
@@ -10523,10 +10523,6 @@ x_delete_display (dpyinfo)
 #ifndef AIX            /* On AIX, XCloseDisplay calls this.  */
   XrmDestroyDatabase (dpyinfo->xrdb);
 #endif
-#endif
-#ifdef HAVE_X_I18N
-  if (dpyinfo->xim)
-    xim_close_dpy (dpyinfo);
 #endif
 
   xfree (dpyinfo->x_id_name);
@@ -10635,6 +10631,13 @@ x_delete_terminal (struct terminal *terminal)
     return;
 
   BLOCK_INPUT;
+#ifdef HAVE_X_I18N
+  /* We must close our connection to the XIM server before closing the
+     X display.  */
+  if (dpyinfo->xim)
+    xim_close_dpy (dpyinfo);
+#endif
+
   /* If called from x_connection_closed, the display may already be closed
      and dpyinfo->display was set to 0 to indicate that.  */
   if (dpyinfo->display)