summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixEvent.c
diff options
context:
space:
mode:
authormdejong <mdejong>2002-09-15 20:38:18 (GMT)
committermdejong <mdejong>2002-09-15 20:38:18 (GMT)
commitdf11e5f0476a83ac5bdf3947313369e5a97a6c37 (patch)
tree5cda710d075e6f5a6c17e88074fab8461583632a /unix/tkUnixEvent.c
parenta092bcb9598779ba5b63b93e127a26e357e4aa99 (diff)
downloadtk-df11e5f0476a83ac5bdf3947313369e5a97a6c37.zip
tk-df11e5f0476a83ac5bdf3947313369e5a97a6c37.tar.gz
tk-df11e5f0476a83ac5bdf3947313369e5a97a6c37.tar.bz2
* unix/configure: Regen.
* unix/tcl.m4: Update from Tcl. * unix/tkUnixEvent.c (TkpCloseDisplay): Use PEEK_XCLOSEIM to examine the input context queue before invoking XCloseIM. Generate an assert if there is an input context that has not been freed. [Patch 570902]
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