summaryrefslogtreecommitdiffstats
path: root/generic/tkWindow.c
diff options
context:
space:
mode:
authordavygrvy <davygrvy>2004-10-27 00:37:37 (GMT)
committerdavygrvy <davygrvy>2004-10-27 00:37:37 (GMT)
commitd33aaf2b8fa569171d30a455a154d803d2ecb5c6 (patch)
treeb983c1273c1a6326de84746006f8e4f502466cdb /generic/tkWindow.c
parent5272d0523a6a8fba692f9407882c5d159db3c3ff (diff)
downloadtk-d33aaf2b8fa569171d30a455a154d803d2ecb5c6.zip
tk-d33aaf2b8fa569171d30a455a154d803d2ecb5c6.tar.gz
tk-d33aaf2b8fa569171d30a455a154d803d2ecb5c6.tar.bz2
* generic/tkInt.h: Backport of shutdown safety mods from the HEAD
* generic/tkMenu.c: dating from 2003-12-21 * generic/tkUtil.c: * generic/tkWindow.c: * mac/tkMacButton.c: * unix/tkUnixEvent.c: * win/tkWin32Dll.c: * win/tkWinEmbed.c: * win/tkWinMenu.c: * win/tkWinX.c:
Diffstat (limited to 'generic/tkWindow.c')
-rw-r--r--generic/tkWindow.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 7a23210..53d4a8c 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.3 2004/03/26 22:01:26 dkf Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.56.2.4 2004/10/27 00:37:38 davygrvy Exp $
*/
#include "tkPort.h"
@@ -360,7 +360,7 @@ CreateTopLevelWindow(interp, parent, name, screenName, flags)
* exits.
*/
- Tcl_CreateExitHandler(DeleteWindowsExitProc, (ClientData) NULL);
+ TkCreateExitHandler(DeleteWindowsExitProc, (ClientData) tsdPtr);
}
if ((parent != NULL) && (screenName != NULL) && (screenName[0] == '\0')) {
@@ -2705,12 +2705,11 @@ Tk_GetNumMainWindows()
static void
DeleteWindowsExitProc(clientData)
- ClientData clientData; /* Not used. */
+ ClientData clientData; /* tsdPtr when handler was created. */
{
TkDisplay *dispPtr, *nextPtr;
Tcl_Interp *interp;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
- Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData;
/*
* Finish destroying any windows that are in a