From 8a59ed048ad3c768155313815729cf11be0f2007 Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 4 Mar 2021 20:39:28 +0000 Subject: Experiment --- tests/event.test | 3 ++- tests/textTag.test | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/event.test b/tests/event.test index bf618ac..4426425 100644 --- a/tests/event.test +++ b/tests/event.test @@ -876,7 +876,8 @@ test event-9 {no event is generated for the container window when its pack [frame .top.f -bg green -width 50 -height 50] -anchor se -side bottom update event generate .top.f -warp 1 -x 25 -y 25 ; # sent to .top and .top.f - update idletasks ; after 50 ; update + update idletasks ; after 50 ; # Win specific - wait for SendInput to be executed + update ; after 50 ; update destroy .top.f ; # no event sent update set res diff --git a/tests/textTag.test b/tests/textTag.test index 825f3b0..ad2a830 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -1613,7 +1613,7 @@ test textTag-16.2 {TkTextPickCurrent procedure} -constraints { event gen .t -x $x2 -y $y2 set x [.t index current] .t tag add big 3.0 - update + update ; after 50 ; update lappend x [.t index current] } -cleanup { .t tag delete big -- cgit v0.12 From d28658ecf2728c9a192d3173ff479302928b3534 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sat, 6 Mar 2021 10:19:16 +0000 Subject: Some debug info in an attempt to understand what's going on with textTag-16.2 (font issue?) --- tests/textTag.test | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/textTag.test b/tests/textTag.test index ad2a830..618b1cc 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -1608,6 +1608,14 @@ test textTag-16.2 {TkTextPickCurrent procedure} -constraints { wm geometry . +200+200 ; update event generate {} -warp 1 -x 5 -y 5 ; update idletasks ; after 50 } -body { +# some debug info +puts [.t cget -font] +puts [font actual [.t cget -font]] +puts [font metrics [.t cget -font]] +puts $bigFont +puts [font actual $bigFont] +puts [font metrics $bigFont] +puts "$x1,$y1 -- $x2,$y2" .t tag configure big -font $bigFont event gen .t -state 0x100 -x $x1 -y $y1 event gen .t -x $x2 -y $y2 -- cgit v0.12 From 0210342821cdeb25a2e7caba21d30ffedd8c6a4e Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 8 Mar 2021 20:05:28 +0000 Subject: event-9: Try an increase of the waiting time. textTag-16.2: For each of the following environnements : * My Win10 at home (PASS) * GitHub action (msvc) (PASS) * GitHub action (gcc(all)) (FAIL) * GitHub action (gcc(mem)) (PASS) the debug output produced by the previous commit is always the same, independently of the PASS or FAIL test result : Courier 12 -family {Courier New} -size 12 -weight normal -slant roman -underline 0 -overstrike 0 -ascent 14 -descent 4 -linespace 18 -fixed 1 Helvetica 24 -family Arial -size 24 -weight normal -slant roman -underline 0 -overstrike 0 -ascent 29 -descent 7 -linespace 36 -fixed 0 17,29 -- 27,47 Conclusion: this is not a font issue. Let's try a different timing test then. --- tests/event.test | 4 ++-- tests/textTag.test | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/event.test b/tests/event.test index 4426425..5db33c5 100644 --- a/tests/event.test +++ b/tests/event.test @@ -876,8 +876,8 @@ test event-9 {no event is generated for the container window when its pack [frame .top.f -bg green -width 50 -height 50] -anchor se -side bottom update event generate .top.f -warp 1 -x 25 -y 25 ; # sent to .top and .top.f - update idletasks ; after 50 ; # Win specific - wait for SendInput to be executed - update ; after 50 ; update + update idletasks ; after 500 ; # Win specific - wait for SendInput to be executed + update ; after 500 ; update destroy .top.f ; # no event sent update set res diff --git a/tests/textTag.test b/tests/textTag.test index 618b1cc..32c317b 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -1608,20 +1608,12 @@ test textTag-16.2 {TkTextPickCurrent procedure} -constraints { wm geometry . +200+200 ; update event generate {} -warp 1 -x 5 -y 5 ; update idletasks ; after 50 } -body { -# some debug info -puts [.t cget -font] -puts [font actual [.t cget -font]] -puts [font metrics [.t cget -font]] -puts $bigFont -puts [font actual $bigFont] -puts [font metrics $bigFont] -puts "$x1,$y1 -- $x2,$y2" .t tag configure big -font $bigFont event gen .t -state 0x100 -x $x1 -y $y1 event gen .t -x $x2 -y $y2 set x [.t index current] .t tag add big 3.0 - update ; after 50 ; update + after 50 ; update ; after 50 ; update lappend x [.t index current] } -cleanup { .t tag delete big -- cgit v0.12 From 92af8d03e7357cd88d0964a41933025a6b3d4c51 Mon Sep 17 00:00:00 2001 From: fvogel Date: Tue, 9 Mar 2021 20:05:54 +0000 Subject: If this still allows event-9 and/or textTag-16.2 to fail, then it cannot be a timing issue. --- tests/event.test | 6 ++++-- tests/textTag.test | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/event.test b/tests/event.test index 5db33c5..d5a9c37 100644 --- a/tests/event.test +++ b/tests/event.test @@ -876,8 +876,10 @@ test event-9 {no event is generated for the container window when its pack [frame .top.f -bg green -width 50 -height 50] -anchor se -side bottom update event generate .top.f -warp 1 -x 25 -y 25 ; # sent to .top and .top.f - update idletasks ; after 500 ; # Win specific - wait for SendInput to be executed - update ; after 500 ; update + update idletasks ; after 50 ; # Win specific - wait for SendInput to be executed + for {set i 0} {$i < 100} {incr i} { + update ; after 50 ; update idletasks ; after 50 + } destroy .top.f ; # no event sent update set res diff --git a/tests/textTag.test b/tests/textTag.test index 32c317b..f0a62f9 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -1613,7 +1613,9 @@ test textTag-16.2 {TkTextPickCurrent procedure} -constraints { event gen .t -x $x2 -y $y2 set x [.t index current] .t tag add big 3.0 - after 50 ; update ; after 50 ; update + for {set i 0} {$i < 100} {incr i} { + update ; after 50 ; update idletasks ; after 50 + } lappend x [.t index current] } -cleanup { .t tag delete big -- cgit v0.12 From 43a8ef828479d4270061a7a0613f053f450e30df Mon Sep 17 00:00:00 2001 From: fvogel Date: Sat, 13 Mar 2021 15:36:04 +0000 Subject: Try Jan's suggestion for event-9: Maybe the update after the pack has a timing issue. What if the pack isn't fully handled yet (in Windows UI thread), so the warp doesn't find the frame it's warping to? So putting some waiting time before this update might help. --- tests/event.test | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/event.test b/tests/event.test index d5a9c37..b6cd5da 100644 --- a/tests/event.test +++ b/tests/event.test @@ -874,12 +874,11 @@ test event-9 {no event is generated for the container window when its pack propagate .top 0 bind .top {lappend res %W} pack [frame .top.f -bg green -width 50 -height 50] -anchor se -side bottom + after 50 update event generate .top.f -warp 1 -x 25 -y 25 ; # sent to .top and .top.f - update idletasks ; after 50 ; # Win specific - wait for SendInput to be executed - for {set i 0} {$i < 100} {incr i} { - update ; after 50 ; update idletasks ; after 50 - } + after 50 ; # Win specific - wait for SendInput to be executed + update ; # idletasks not enough destroy .top.f ; # no event sent update set res -- cgit v0.12 From fd6f52090ad7d1470c0f692e977e585135508686 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 14 Mar 2021 19:58:25 +0000 Subject: textTag-16.2: Try an update after configuring the 'big' tag, even if the tag is not yet applied to anything. --- tests/textTag.test | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/textTag.test b/tests/textTag.test index f0a62f9..ad4b1c6 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -1609,13 +1609,12 @@ test textTag-16.2 {TkTextPickCurrent procedure} -constraints { event generate {} -warp 1 -x 5 -y 5 ; update idletasks ; after 50 } -body { .t tag configure big -font $bigFont + update event gen .t -state 0x100 -x $x1 -y $y1 event gen .t -x $x2 -y $y2 set x [.t index current] .t tag add big 3.0 - for {set i 0} {$i < 100} {incr i} { - update ; after 50 ; update idletasks ; after 50 - } + update lappend x [.t index current] } -cleanup { .t tag delete big -- cgit v0.12 From 4583642163e925ff446f94e90fefea140093603f Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 15 Mar 2021 18:06:00 +0000 Subject: Make a trivial change (add a space character in the textTag.test file) just to let GitActions run again. --- tests/textTag.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/textTag.test b/tests/textTag.test index ad4b1c6..f04e8bf 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -1600,7 +1600,7 @@ test textTag-16.1 {TkTextPickCurrent procedure} -constraints { event gen .t -state 0x100 -x $x3 -y $y3 lappend x [.t index current] } -result {2.1 3.2 3.2 3.2 3.2 3.2 4.3} - + test textTag-16.2 {TkTextPickCurrent procedure} -constraints { haveCourier12 failsOnUbuntuNoXft } -setup { -- cgit v0.12 From e006dad74d242f9156e0205984695530f351d644 Mon Sep 17 00:00:00 2001 From: fvogel Date: Tue, 16 Mar 2021 19:49:24 +0000 Subject: Backout previous trivial change, and let GitActions run again. --- tests/textTag.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/textTag.test b/tests/textTag.test index f04e8bf..ad4b1c6 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -1600,7 +1600,7 @@ test textTag-16.1 {TkTextPickCurrent procedure} -constraints { event gen .t -state 0x100 -x $x3 -y $y3 lappend x [.t index current] } -result {2.1 3.2 3.2 3.2 3.2 3.2 4.3} - + test textTag-16.2 {TkTextPickCurrent procedure} -constraints { haveCourier12 failsOnUbuntuNoXft } -setup { -- cgit v0.12 From db87abfcdd94fe2da0aa5c067ab34718acfe9ec0 Mon Sep 17 00:00:00 2001 From: fvogel Date: Wed, 17 Mar 2021 18:04:50 +0000 Subject: Once more. Make a trivial change (add a space character in the textTag.test file) just to let GitActions run again. --- tests/textTag.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/textTag.test b/tests/textTag.test index ad4b1c6..f04e8bf 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -1600,7 +1600,7 @@ test textTag-16.1 {TkTextPickCurrent procedure} -constraints { event gen .t -state 0x100 -x $x3 -y $y3 lappend x [.t index current] } -result {2.1 3.2 3.2 3.2 3.2 3.2 4.3} - + test textTag-16.2 {TkTextPickCurrent procedure} -constraints { haveCourier12 failsOnUbuntuNoXft } -setup { -- cgit v0.12 From c6a3dbfd1f51c714072518515910e94885a482f3 Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 18 Mar 2021 18:32:14 +0000 Subject: Once more. Backout previous trivial change, and let GitActions run again. --- tests/textTag.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/textTag.test b/tests/textTag.test index f04e8bf..ad4b1c6 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -1600,7 +1600,7 @@ test textTag-16.1 {TkTextPickCurrent procedure} -constraints { event gen .t -state 0x100 -x $x3 -y $y3 lappend x [.t index current] } -result {2.1 3.2 3.2 3.2 3.2 3.2 4.3} - + test textTag-16.2 {TkTextPickCurrent procedure} -constraints { haveCourier12 failsOnUbuntuNoXft } -setup { -- cgit v0.12 From 456bdbef6aa204ab7fd53b8993eb17626a850d23 Mon Sep 17 00:00:00 2001 From: fvogel Date: Fri, 19 Mar 2021 20:30:45 +0000 Subject: Another trivial change, let the GitHub action run again. --- tests/textTag.test | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/textTag.test b/tests/textTag.test index ad4b1c6..e36cf30 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -1609,6 +1609,7 @@ test textTag-16.2 {TkTextPickCurrent procedure} -constraints { event generate {} -warp 1 -x 5 -y 5 ; update idletasks ; after 50 } -body { .t tag configure big -font $bigFont + # update needed here to stabilize the test update event gen .t -state 0x100 -x $x1 -y $y1 event gen .t -x $x2 -y $y2 -- cgit v0.12 From 31cb48bf63892149837600c4edb033d06308898c Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 21 Mar 2021 08:05:07 +0000 Subject: Add a comment in event-9 and let GitActions run one more time. --- tests/event.test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/event.test b/tests/event.test index b6cd5da..24d6caf 100644 --- a/tests/event.test +++ b/tests/event.test @@ -874,6 +874,8 @@ test event-9 {no event is generated for the container window when its pack propagate .top 0 bind .top {lappend res %W} pack [frame .top.f -bg green -width 50 -height 50] -anchor se -side bottom + # stabilize the test by giving some time to the OS before the upcoming update, + # so that -warp below finds the frame after 50 update event generate .top.f -warp 1 -x 25 -y 25 ; # sent to .top and .top.f -- cgit v0.12