diff options
Diffstat (limited to 'unix/tkUnixEvent.c')
-rw-r--r-- | unix/tkUnixEvent.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c index 98132a1..918d66a 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.8 2002/06/15 01:54:09 hobbs Exp $ + * RCS: @(#) $Id: tkUnixEvent.c,v 1.9 2002/06/19 19:37:55 mdejong Exp $ */ #include "tkInt.h" @@ -172,24 +172,23 @@ TkpCloseDisplay(dispPtr) XFreeFontSet(dispPtr->display, dispPtr->inputXfs); } #endif -#if ! defined(SOLARIS2) || defined(HAVE_X11R6) if (dispPtr->inputMethod) { /* - * This causes core dumps on some systems (e.g. Solaris 2.3 as of - * 1/6/95), but is OK with X11R6 + * This caused core dumps on some systems (Solaris 2.3 1/6/95). + * The most likely cause of this is a bug in X that accesses + * memory that was already deallocated inside XCloseIM(). + * One can work around this issue by making sure a XDestroyIC() + * gets invoked for each XCreateIC(). */ XCloseIM(dispPtr->inputMethod); } #endif -#endif if (dispPtr->display != 0) { Tcl_DeleteFileHandler(ConnectionNumber(dispPtr->display)); (void) XSync(dispPtr->display, False); (void) XCloseDisplay(dispPtr->display); } - - ckfree((char *) dispPtr); } /* @@ -610,12 +609,10 @@ OpenIM(dispPtr) if (dispPtr->inputMethod) { /* - * This causes core dumps on some systems (e.g. Solaris 2.3 as of - * 1/6/95), but is OK with X11R6 + * This call should not suffer from any core dumping problems + * since we have not allocated any input contexts. */ -#if ! defined (SOLARIS2) || defined (HAVE_X11R6) XCloseIM(dispPtr->inputMethod); -#endif dispPtr->inputMethod = NULL; } } |