summaryrefslogtreecommitdiffstats
path: root/generic/tkWindow.c
diff options
context:
space:
mode:
authorjenglish@flightlab.com <jenglish>2003-01-28 20:39:11 (GMT)
committerjenglish@flightlab.com <jenglish>2003-01-28 20:39:11 (GMT)
commit30d7251c0104f89f36c8f00c7183eba7ded0029b (patch)
tree99e3eac7f3cd5a09489b7bade74de5492f9a9208 /generic/tkWindow.c
parent8d5d43290eb55317c071fc6c1ffff02e0a48aa9b (diff)
downloadtk-30d7251c0104f89f36c8f00c7183eba7ded0029b.zip
tk-30d7251c0104f89f36c8f00c7183eba7ded0029b.tar.gz
tk-30d7251c0104f89f36c8f00c7183eba7ded0029b.tar.bz2
Moved 'deletionEpoch' field from TkDisplay to TkMainInfo.
Reworked windowObj type. Fixes Tk Bug #671330 "segfault when e.g. deiconifying destroyed window"
Diffstat (limited to 'generic/tkWindow.c')
-rw-r--r--generic/tkWindow.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index dc75118..c1e6499 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.55 2002/11/14 17:30:20 mdejong Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.56 2003/01/28 20:39:17 jenglish Exp $
*/
#include "tkPort.h"
@@ -888,6 +888,7 @@ TkCreateMainWindow(interp, screenName, baseName)
mainPtr->refCount = 1;
mainPtr->interp = interp;
Tcl_InitHashTable(&mainPtr->nameTable, TCL_STRING_KEYS);
+ mainPtr->deletionEpoch = 0l;
TkEventInit();
TkBindInit(mainPtr);
TkFontPkgInit(mainPtr);
@@ -1493,9 +1494,10 @@ Tk_DestroyWindow(tkwin)
winPtr->pathName = NULL;
/*
- * Invalidate all objects referring to windows on this display.
+ * Invalidate all objects referring to windows
+ * with the same main window
*/
- dispPtr->deletionEpoch++;
+ winPtr->mainPtr->deletionEpoch++;
}
winPtr->mainPtr->refCount--;
if (winPtr->mainPtr->refCount == 0) {