summaryrefslogtreecommitdiffstats
path: root/tests/textImage.test
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2022-10-11 20:13:03 (GMT)
committerfvogel <fvogelnew1@free.fr>2022-10-11 20:13:03 (GMT)
commit39b4a070af5ed074efb46594218092ddfa024ea7 (patch)
treea2f7ede0c0484d0cc909afb2f12bd89f8e0a843c /tests/textImage.test
parent5a64bed54b2c6a377a74941a0c09c4324c9cf878 (diff)
downloadtk-39b4a070af5ed074efb46594218092ddfa024ea7.zip
tk-39b4a070af5ed074efb46594218092ddfa024ea7.tar.gz
tk-39b4a070af5ed074efb46594218092ddfa024ea7.tar.bz2
Further try to avoid possible hangs in frame-12.3, textImage-4.2, font-47.2 and font-47.3. Hangs were (still) observed with frame-12.3 on macOS. This commit is based on an analysis of what is happening (from the events point of view) when changing a font configuration such as its size.
Diffstat (limited to 'tests/textImage.test')
-rw-r--r--tests/textImage.test6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/textImage.test b/tests/textImage.test
index 8586b6c..40f0829 100644
--- a/tests/textImage.test
+++ b/tests/textImage.test
@@ -387,15 +387,13 @@ test textImage-4.2 {alignment checking - baseline} -setup {
.t image create end -image small -align baseline
.t insert end test
update
- bind .t <<TkWorldChanged>> { set fontwait 1 }
# Sizes larger than 25 can be too big and lead to a negative 'norm',
# at least on Windows XP with certain settings.
foreach size {10 15 20 25} {
- set fontwait 0
font configure test_font2 -size $size
array set Metrics [font metrics test_font2]
- update
- if {!$fontwait} {vwait fontwait}
+ update idletasks ; # services the idle "TheWorldHasChanged" event, queues "TkWorldChanged" events
+ update ; # services the queued "TkWorldChanged" events
foreach {x y w h} [.t bbox small] {}
set norm [expr {
(([image height large] - $Metrics(-linespace))/2