# HG changeset patch # User Chong Yidong # Date 1229206149 0 # Node ID f6aba62369b8c534bb72a3f334eeb4d8102241d9 # Parent e4c3e6a1013d96cfd24456d11c5aa8cc4a0d4378 (x_delete_display): Move xim_close_dpy call to x_delete_terminal. (x_delete_terminal): Call xim_close_dpy. diff -r e4c3e6a1013d -r f6aba62369b8 src/xterm.c --- a/src/xterm.c Sat Dec 13 22:08:58 2008 +0000 +++ b/src/xterm.c Sat Dec 13 22:09:09 2008 +0000 @@ -10524,10 +10524,6 @@ XrmDestroyDatabase (dpyinfo->xrdb); #endif #endif -#ifdef HAVE_X_I18N - if (dpyinfo->xim) - xim_close_dpy (dpyinfo); -#endif xfree (dpyinfo->x_id_name); xfree (dpyinfo->x_dnd_atoms); @@ -10635,6 +10631,13 @@ 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)