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)
commit54cfa15d4fc3958ac9a387965ae472bd82a8ba3c (patch)
tree5cda710d075e6f5a6c17e88074fab8461583632a /unix/tkUnixEvent.c
parentffa7145291c84c25259567a5ed6cfc14885c2649 (diff)
downloadtk-54cfa15d4fc3958ac9a387965ae472bd82a8ba3c.zip
tk-54cfa15d4fc3958ac9a387965ae472bd82a8ba3c.tar.gz
tk-54cfa15d4fc3958ac9a387965ae472bd82a8ba3c.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