summaryrefslogtreecommitdiffstats
path: root/generic/tkWindow.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2001-08-21 14:43:08 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2001-08-21 14:43:08 (GMT)
commitc9fb1f587664806275461fcf4b872e8acdd913b9 (patch)
tree7e8433d81799a34d2318762f17b82e43ed5300d6 /generic/tkWindow.c
parent7f3008ca65c1e1b6e1b5079bd1eb28794c9e02fb (diff)
downloadtk-c9fb1f587664806275461fcf4b872e8acdd913b9.zip
tk-c9fb1f587664806275461fcf4b872e8acdd913b9.tar.gz
tk-c9fb1f587664806275461fcf4b872e8acdd913b9.tar.bz2
TkGetWindowFromObj was useless CPU waster; now caches window names *safely*
Diffstat (limited to 'generic/tkWindow.c')
-rw-r--r--generic/tkWindow.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index ca1c9f7..1102fab 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.33 2001/08/15 15:44:36 dkf Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.34 2001/08/21 14:43:08 dkf Exp $
*/
#include "tkPort.h"
@@ -470,6 +470,7 @@ GetScreen(interp, screenName, screenPtr)
dispPtr->useInputMethods = 0;
OpenIM(dispPtr);
TkInitXId(dispPtr);
+ dispPtr->deletionEpoch = 0L;
tsdPtr->displayList = dispPtr;
break;
@@ -1387,6 +1388,10 @@ Tk_DestroyWindow(tkwin)
(ClientData) winPtr->pathName);
Tcl_DeleteHashEntry(Tcl_FindHashEntry(&winPtr->mainPtr->nameTable,
winPtr->pathName));
+ /*
+ * Invalidate all objects referring to windows on this display.
+ */
+ dispPtr->deletionEpoch++;
}
winPtr->mainPtr->refCount--;
if (winPtr->mainPtr->refCount == 0) {