summaryrefslogtreecommitdiffstats
path: root/generic/tkWindow.c
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2003-01-28 20:39:11 (GMT)
committerjenglish <jenglish@flightlab.com>2003-01-28 20:39:11 (GMT)
commit68229120ac33cd987e6aa92a2415c9553a7e4c8c (patch)
tree99e3eac7f3cd5a09489b7bade74de5492f9a9208 /generic/tkWindow.c
parent4d6f4ace4449f166c0bbdbbd10b5dc9efce36eeb (diff)
downloadtk-68229120ac33cd987e6aa92a2415c9553a7e4c8c.zip
tk-68229120ac33cd987e6aa92a2415c9553a7e4c8c.tar.gz
tk-68229120ac33cd987e6aa92a2415c9553a7e4c8c.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) {