summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorculler <culler>2020-05-12 15:49:15 (GMT)
committerculler <culler>2020-05-12 15:49:15 (GMT)
commit8ad5f9058858a5dfbac3f099ed0bd50187a05810 (patch)
treecc1e6ca27cbbc5e13c308e12490012dadfbc158b /tests
parent523aa062a1f89ea321f1d046e44486dc6523d3f1 (diff)
parent81efacd24cdb3ae469b8dd7a6d9b8524ead62dc7 (diff)
downloadtk-8ad5f9058858a5dfbac3f099ed0bd50187a05810.zip
tk-8ad5f9058858a5dfbac3f099ed0bd50187a05810.tar.gz
tk-8ad5f9058858a5dfbac3f099ed0bd50187a05810.tar.bz2
Fix [411359dc3b]: crashes and zombies on Macintosh computers with a TouchBar.
Diffstat (limited to 'tests')
-rw-r--r--tests/canvImg.test2
-rw-r--r--tests/event.test1
-rw-r--r--tests/frame.test27
-rw-r--r--tests/text.test3
4 files changed, 26 insertions, 7 deletions
diff --git a/tests/canvImg.test b/tests/canvImg.test
index a5e8e10..b60e384 100644
--- a/tests/canvImg.test
+++ b/tests/canvImg.test
@@ -803,7 +803,7 @@ test canvImg-11.3 {ImageChangedProc procedure} -constraints {
foo2 changed 0 0 0 0 80 60
.c create image 50 100 -image foo -tags image -anchor nw
.c create image 70 110 -image foo2 -anchor nw
- update
+ update idletasks
set z {}
set timer [after 500 {lappend z "timed out"}]
image create test foo -variable x
diff --git a/tests/event.test b/tests/event.test
index a95815e..ad3a1bc 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -860,6 +860,7 @@ test event-8 {event generate with keysyms corresponding to
} -result {OK}
# cleanup
+update
unset -nocomplain keypress_lookup
rename _init_keypress_lookup {}
rename _keypress_lookup {}
diff --git a/tests/frame.test b/tests/frame.test
index 88f74f9..63bb187 100644
--- a/tests/frame.test
+++ b/tests/frame.test
@@ -673,11 +673,19 @@ test frame-3.10 {TkCreateFrame procedure, -use option} -constraints {
} -body {
toplevel .t -container 1 -width 300 -height 120
wm geometry .t +0+0
+ if {[tk windowingsystem] eq "aqua"} {
+ update idletasks
+ } else {
+ update
+ }
option add *x.use [winfo id .t]
- update
toplevel .x -width 140 -height 300 -bg green
- tkwait visibility .x
- update
+ if {[tk windowingsystem] eq "aqua"} {
+ update idletasks
+ } else {
+ tkwait visibility .x
+ update
+ }
list [expr {[winfo rootx .x] - [winfo rootx .t]}] \
[expr {[winfo rooty .x] - [winfo rooty .t]}] \
[winfo width .t] [winfo height .t]
@@ -1154,17 +1162,26 @@ test frame-12.2 {FrameWorldChanged procedure} -setup {
} -result {1 1 1 1 1 1 1 1 1 1 1 1}
test frame-12.3 {FrameWorldChanged procedure} -setup {
deleteWindows
+ update idletasks
} -body {
# Check reaction on font change
font create myfont -family courier -size 10
labelframe .f -font myfont -text Mupp
place .f -x 0 -y 0 -width 40 -height 40
pack [frame .f.f] -fill both -expand 1
- update
+ if {[tk windowingsystem] eq "aqua"} {
+ update idletasks
+ } else {
+ update
+ }
set h1 [font metrics myfont -linespace]
set y1 [winfo y .f.f]
font configure myfont -size 20
- update
+ if {[tk windowingsystem] eq "aqua"} {
+ update idletasks
+ } else {
+ update
+ }
set h2 [font metrics myfont -linespace]
set y2 [winfo y .f.f]
expr {($h2 - $h1) - ($y2 - $y1)}
diff --git a/tests/text.test b/tests/text.test
index 5b2d7e3..61a54ab 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -6692,7 +6692,8 @@ test text-27.15d {<<Selection>> virtual event on <Delete> with cursor inside sel
update
set ::retval no_<<Selection>>_event_fired
.t mark set insert 1.15
- focus .t
+ update idletasks
+ focus -force .t
event generate .t <Delete>
update
set ::retval