summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-08-01 20:24:48 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-08-01 20:24:48 (GMT)
commitacf4293cf37a201ebfa87e6e659bf7cfc9535963 (patch)
tree3d3883042dc282218ebe4f6086aa1fb57b6f3420 /win
parentf02960739692cea710d87f40a460c9564e8cc10c (diff)
downloadtk-acf4293cf37a201ebfa87e6e659bf7cfc9535963.zip
tk-acf4293cf37a201ebfa87e6e659bf7cfc9535963.tar.gz
tk-acf4293cf37a201ebfa87e6e659bf7cfc9535963.tar.bz2
Backported fixes for handling unmapped parent toplevels. [Bug 2009788, 2028703]
Diffstat (limited to 'win')
-rw-r--r--win/tkWinWm.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index d9fc1ac..4f891ee 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.124 2007/12/14 15:56:09 patthoyts Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.124.2.1 2008/08/01 20:24:50 patthoyts Exp $
*/
#include "tkWinInt.h"
@@ -3706,7 +3706,9 @@ WmForgetCmd(tkwin, winPtr, interp, objc, objv)
if (Tk_IsTopLevel(frameWin)) {
Tk_UnmapWindow(frameWin);
winPtr->flags &= ~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED);
- RemapWindows(winPtr, Tk_GetHWND(winPtr->parentPtr->window));
+ if (Tk_IsMapped(Tk_Parent(frameWin))) {
+ RemapWindows(winPtr, Tk_GetHWND(winPtr->parentPtr->window));
+ }
TkWmDeadWindow(winPtr);
/* flags (above) must be cleared before calling */
/* TkMapTopFrame (below) */
@@ -5872,13 +5874,15 @@ TopLevelReqProc(
WmInfo *wmPtr;
wmPtr = winPtr->wmInfoPtr;
- if ((winPtr->flags & TK_EMBEDDED) && (wmPtr->wrapper != NULL)) {
- SendMessage(wmPtr->wrapper, TK_GEOMETRYREQ, Tk_ReqWidth(tkwin),
+ if (wmPtr) {
+ if ((winPtr->flags & TK_EMBEDDED) && (wmPtr->wrapper != NULL)) {
+ SendMessage(wmPtr->wrapper, TK_GEOMETRYREQ, Tk_ReqWidth(tkwin),
Tk_ReqHeight(tkwin));
- }
- if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) {
- Tcl_DoWhenIdle(UpdateGeometryInfo, (ClientData) winPtr);
- wmPtr->flags |= WM_UPDATE_PENDING;
+ }
+ if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) {
+ Tcl_DoWhenIdle(UpdateGeometryInfo, winPtr);
+ wmPtr->flags |= WM_UPDATE_PENDING;
+ }
}
}