diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2011-03-19 00:39:28 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2011-03-19 00:39:28 (GMT) |
commit | 8e03b7eca925f942180c55714f1d9ca8436452f6 (patch) | |
tree | d4842afa8fb7baa0b991eca79b8907667f4adc1e /win/tkWinWm.c | |
parent | 9eee646855b9f1dd6ed5c8dc3f7d5f7ad1ff52ef (diff) | |
download | tk-8e03b7eca925f942180c55714f1d9ca8436452f6.zip tk-8e03b7eca925f942180c55714f1d9ca8436452f6.tar.gz tk-8e03b7eca925f942180c55714f1d9ca8436452f6.tar.bz2 |
[Bug 3205464] - handle [wm forget] when the parent is unmapped on windows
The fix for [Bug 2009788] prevented a crash but causes windows to be lost
if their parent is unmapped when [wm forget] is called. Added a test for
this case and ensure that the parent window exists when we remap the
child to its parent.
Reported-by: Koen Danckaert <danckaert@users.sourceforge.net>
Reported-by: Eric Boudaillier <beric@users.sourceforge.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r-- | win/tkWinWm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 290fe3e..d8d3b19 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -3706,9 +3706,8 @@ 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); - if (Tk_IsMapped(Tk_Parent(frameWin))) { - RemapWindows(winPtr, Tk_GetHWND(winPtr->parentPtr->window)); - } + Tk_MakeWindowExist((Tk_Window)winPtr->parentPtr); + RemapWindows(winPtr, Tk_GetHWND(winPtr->parentPtr->window)); TkWmDeadWindow(winPtr); /* flags (above) must be cleared before calling */ /* TkMapTopFrame (below) */ |