diff options
author | dkf <dkf@noemail.net> | 2001-08-21 14:43:08 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2001-08-21 14:43:08 (GMT) |
commit | 1e5651f429cb7dcec4654cdd86139a73a7636a31 (patch) | |
tree | 7e8433d81799a34d2318762f17b82e43ed5300d6 /generic/tkWindow.c | |
parent | 5122a52802fb7bce2fabd336e24d624d3c35ebc1 (diff) | |
download | tk-1e5651f429cb7dcec4654cdd86139a73a7636a31.zip tk-1e5651f429cb7dcec4654cdd86139a73a7636a31.tar.gz tk-1e5651f429cb7dcec4654cdd86139a73a7636a31.tar.bz2 |
TkGetWindowFromObj was useless CPU waster; now caches window names *safely*
FossilOrigin-Name: 3d9110bdb50fc276df9cbec88d53054277a94b04
Diffstat (limited to 'generic/tkWindow.c')
-rw-r--r-- | generic/tkWindow.c | 7 |
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) { |