summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixEvent.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tkUnixEvent.c')
-rw-r--r--unix/tkUnixEvent.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c
index 918d66a..acdf97b 100644
--- a/unix/tkUnixEvent.c
+++ b/unix/tkUnixEvent.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixEvent.c,v 1.9 2002/06/19 19:37:55 mdejong Exp $
+ * RCS: @(#) $Id: tkUnixEvent.c,v 1.10 2002/09/15 20:38:18 mdejong Exp $
*/
#include "tkInt.h"
@@ -26,6 +26,17 @@ typedef struct ThreadSpecificData {
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
+#if defined(TK_USE_INPUT_METHODS) && defined(PEEK_XCLOSEIM)
+/*
+ * Structure used to peek into internal XIM data structure.
+ * Enabled only on systems where we are sure it works.
+ */
+struct XIMPeek {
+ void *junk1, *junk2;
+ XIC ic_chain;
+};
+#endif
+
/*
* Prototypes for procedures that are referenced only in this file:
*/
@@ -180,6 +191,12 @@ TkpCloseDisplay(dispPtr)
* One can work around this issue by making sure a XDestroyIC()
* gets invoked for each XCreateIC().
*/
+
+#if defined(TK_USE_INPUT_METHODS) && defined(PEEK_XCLOSEIM)
+ struct XIMPeek *peek = (struct XIMPeek *) dispPtr->inputMethod;
+ if (peek->ic_chain != NULL)
+ panic("input contexts not freed before XCloseIM");
+#endif
XCloseIM(dispPtr->inputMethod);
}
#endif