From b76407c7250e530679c766f3a13f1a521669c9f9 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 30 Mar 2006 01:38:39 +0000 Subject: * generic/tkWindow.c (DeleteWindowsExitProc): added comments * generic/tkOption.c (TkOptionDeadWindow): handle OptionThreadExitProc being called before DeleteWindowsExitProc. --- ChangeLog | 12 +++++++++--- generic/tkOption.c | 8 ++++++-- generic/tkWindow.c | 6 ++++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index d3f4a2f..1ffce3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,14 @@ +2006-03-29 Jeff Hobbs + + * generic/tkWindow.c (DeleteWindowsExitProc): added comments + * generic/tkOption.c (TkOptionDeadWindow): handle + OptionThreadExitProc being called before DeleteWindowsExitProc. + 2006-03-29 Don Porter - * unix/tkUnixDefault.h: Changed "Black" to "#000000" and "White" to - "#ffffff" to work around the (broken?) X servers that do not accept - those color names. [Bug 917433] + * unix/tkUnixDefault.h: Changed "Black" to "#000000" and "White" to + "#ffffff" to work around the (broken?) X servers that do not accept + those color names. [Bug 917433] 2006-03-28 Jeff Hobbs diff --git a/generic/tkOption.c b/generic/tkOption.c index 7f1b007..064a68f 100644 --- a/generic/tkOption.c +++ b/generic/tkOption.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkOption.c,v 1.15 2002/08/05 04:30:40 dgp Exp $ + * RCS: @(#) $Id: tkOption.c,v 1.15.2.1 2006/03/30 01:38:39 hobbs Exp $ */ #include "tkPort.h" @@ -770,9 +770,13 @@ TkOptionDeadWindow(winPtr) /* * If this window is in the option stacks, then clear the stacks. + * + * XXX: OptionThreadExitProc will be invoked before DeleteWindowsExitProc + * XXX: if it is thread-specific (which it should be), invalidating the + * XXX: tsd. Tk shutdown needs to be verified to handle this correctly. */ - if (winPtr->optionLevel != -1) { + if (tsdPtr->initialized && (winPtr->optionLevel != -1)) { int i; for (i = 1; i <= tsdPtr->curLevel; i++) { diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 500aaac..4994d1e 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWindow.c,v 1.56.2.7 2006/03/29 05:38:14 hobbs Exp $ + * RCS: @(#) $Id: tkWindow.c,v 1.56.2.8 2006/03/30 01:38:39 hobbs Exp $ */ #include "tkPort.h" @@ -357,7 +357,9 @@ CreateTopLevelWindow(interp, parent, name, screenName, flags) /* * Create exit handler to delete all windows when the application - * exits. This must be a thread exit handler. + * exits. This must be a thread exit handler, but there may be + * ordering issues with other exit handlers + * (i.e. OptionThreadExitProc). */ Tcl_CreateThreadExitHandler(DeleteWindowsExitProc, -- cgit v0.12