diff options
author | hobbs <hobbs> | 2000-01-27 05:03:05 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2000-01-27 05:03:05 (GMT) |
commit | 366fd9beda032b13d073e0f6331831adcbb02559 (patch) | |
tree | 871324cd9a5e846cd071ec927181aad7a3ac6e32 /win/tkWinWm.c | |
parent | 9ecded6646c6fd2abf1d7af4b27025ceb195c7cb (diff) | |
download | tk-366fd9beda032b13d073e0f6331831adcbb02559.zip tk-366fd9beda032b13d073e0f6331831adcbb02559.tar.gz tk-366fd9beda032b13d073e0f6331831adcbb02559.tar.bz2 |
fixes transient window crash when transient is destroyed while master
is iconified/withdrawn
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r-- | win/tkWinWm.c | 21 |
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 } } } |