summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2011-03-19 00:45:48 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2011-03-19 00:45:48 (GMT)
commit9877bff21b10ed751ef2d404fbd7b0a630714f43 (patch)
treee72af6bc0ac9d3232caff3de008f7ce0820a5959 /tests
parent04fa2bde6b15a1ac93a0091be9f714b9f8014d1b (diff)
parent25da577cdf47ba31dadd5f5234a2b3d60242f9f7 (diff)
downloadtk-9877bff21b10ed751ef2d404fbd7b0a630714f43.zip
tk-9877bff21b10ed751ef2d404fbd7b0a630714f43.tar.gz
tk-9877bff21b10ed751ef2d404fbd7b0a630714f43.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 'tests')
-rw-r--r--tests/winWm.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/winWm.test b/tests/winWm.test
index 7260a06..6b8fc81 100644
--- a/tests/winWm.test
+++ b/tests/winWm.test
@@ -533,6 +533,37 @@ test winWm-9.1 "delayed activation of grabbed destroyed window" -constraints win
}
destroy .tx .t .sd
} -result {ok}
+
+test winWm-9.2 "check wm forget for unmapped parent (#3205464,#2967911)" -setup {
+ destroy .t
+ toplevel .t
+ set winwm92 {}
+ frame .t.f -background blue -height 200 -width 200
+ frame .t.f.x -background red -height 100 -width 100
+} -body {
+ pack .t.f.x
+ pack .t.f
+ set aid [after 1000 {set ::winwm92 timeout}]
+ after 100 {
+ wm manage .t.f
+ wm iconify .t
+ after 100 {
+ wm forget .t.f
+ wm deiconify .t
+ after 100 {
+ pack .t.f
+ after 100 {set ::winwm92 [expr {[winfo rooty .t.f.x] == 0 ? "failed" : "ok"}]}
+ }
+ }
+ }
+ vwait ::winwm92
+ after cancel $aid
+ set winwm92
+} -cleanup {
+ destroy .t.f.x .t.f .t
+ unset -nocomplain winwm92 aid
+} -result ok
+
destroy .t
# cleanup