summaryrefslogtreecommitdiffstats
path: root/tests/canvWind.test
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2022-03-19 23:36:01 (GMT)
committerfvogel <fvogelnew1@free.fr>2022-03-19 23:36:01 (GMT)
commit278d27a0a645420f41cae22044ccc649cfe35176 (patch)
tree0d4e2699b389edf2d5026baea6b96d103df70eda /tests/canvWind.test
parentad1bcacba363899b34e3522e366e67f74ed7560d (diff)
parent2ef21d2a470c323fd6ece255ba9213f3c4d156d0 (diff)
downloadtk-278d27a0a645420f41cae22044ccc649cfe35176.zip
tk-278d27a0a645420f41cae22044ccc649cfe35176.tar.gz
tk-278d27a0a645420f41cae22044ccc649cfe35176.tar.bz2
Fix [5412c64a79]: Segmentation fault on closing error report window. This deals with when a canvas embedded window gets destroyed through a binding to <Configure>. Also scheduled idletasks for deleted containers must be canceled.
Diffstat (limited to 'tests/canvWind.test')
-rw-r--r--tests/canvWind.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/canvWind.test b/tests/canvWind.test
index cef0cb8..6af76c7 100644
--- a/tests/canvWind.test
+++ b/tests/canvWind.test
@@ -139,6 +139,22 @@ test canvWind-1.4 {DisplayWinItem, windows off-screen horizontally} -setup {
destroy .t
} -result {{1 3} {1 -79} {0 -79} {1 255} {0 255}}
+test canvWind-2.1 {DisplayWinItem, window gets destroyed duing <Configure>} -setup {
+ destroy .t
+} -body {
+ toplevel .t
+ canvas .t.c
+ pack .t.c
+ frame .t.c.f -width 50 -height 50 -background red
+ set id [.t.c create window 50 50 -window .t.c.f]
+ update
+ bind .t.c.f <Configure> {destroy .t.c.f}
+ .t.c coords $id 60 60 ; # crashes!
+ update
+} -cleanup {
+ destroy .t
+} -result {}
+
# cleanup
cleanupTests
return