summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/tkWinWm.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index ca1e819..69074dc 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.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: tkWinWm.c,v 1.17 2000/01/21 04:33:41 hobbs Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.18 2000/01/27 05:03:05 hobbs Exp $
*/
#include "tkWinInt.h"
@@ -1088,6 +1088,20 @@ TkWmDeadWindow(winPtr)
if (wmPtr->flags & WM_UPDATE_PENDING) {
Tcl_CancelIdleCall(UpdateGeometryInfo, (ClientData) winPtr);
}
+ if (wmPtr->masterPtr != NULL) {
+ wmPtr2 = wmPtr->masterPtr->wmInfoPtr;
+ /*
+ * If we had a master, tell them that we aren't tied
+ * to them anymore
+ */
+ if (wmPtr2 != NULL) {
+ wmPtr2->numTransients--;
+ }
+ Tk_DeleteEventHandler((Tk_Window) wmPtr->masterPtr,
+ VisibilityChangeMask,
+ WmWaitVisibilityProc, (ClientData) winPtr);
+ wmPtr->masterPtr = NULL;
+ }
/*
* Destroy the decorative frame window.
@@ -2302,11 +2316,6 @@ WmWaitVisibilityProc(clientData, eventPtr)
if ((state == NormalState) || (state == ZoomState)) {
TkpWmSetState(winPtr, state);
UpdateWrapper(winPtr);
-#if 0
- Tk_DeleteEventHandler((Tk_Window) masterPtr,
- VisibilityChangeMask,
- WmWaitVisibilityProc, (ClientData) winPtr);
-#endif
}
}
}