summaryrefslogtreecommitdiffstats
path: root/tests/frame.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/frame.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/frame.test')
-rw-r--r--tests/frame.test6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/frame.test b/tests/frame.test
index 132df17..1f91104 100644
--- a/tests/frame.test
+++ b/tests/frame.test
@@ -1163,13 +1163,11 @@ test frame-12.3 {FrameWorldChanged procedure} -setup {
place .f -x 0 -y 0 -width 40 -height 40
pack [frame .f.f] -fill both -expand 1
update
- bind .f <<TkWorldChanged>> { set fontwait 1 }
set h1 [font metrics myfont -linespace]
set y1 [winfo y .f.f]
- set fontwait 0
font configure myfont -size 20
- update
- if {!$fontwait} {vwait fontwait}
+ update idletasks ; # services the idle "TheWorldHasChanged" event, queues "TkWorldChanged" events
+ update ; # services the queued "TkWorldChanged" events
set h2 [font metrics myfont -linespace]
set y2 [winfo y .f.f]
expr {($h2 - $h1) - ($y2 - $y1)}