summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorculler <culler>2020-05-12 15:49:44 (GMT)
committerculler <culler>2020-05-12 15:49:44 (GMT)
commit56b8b24c8a7a16bb713b397cfd7567bb74e0a231 (patch)
treec2e96ff2fe13976d6be2bc8b1152096a15723527 /tests
parentf295f92dd0c2e638798d2e8c937eb6dd15090d45 (diff)
parent8ad5f9058858a5dfbac3f099ed0bd50187a05810 (diff)
downloadtk-56b8b24c8a7a16bb713b397cfd7567bb74e0a231.zip
tk-56b8b24c8a7a16bb713b397cfd7567bb74e0a231.tar.gz
tk-56b8b24c8a7a16bb713b397cfd7567bb74e0a231.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 bd9edb5..d6ed9a8 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 b4d2ce9..2e53196 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 77eae31..bdeb2e9 100644
--- a/tests/frame.test
+++ b/tests/frame.test
@@ -670,11 +670,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]
@@ -1133,17 +1141,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 8019e0d..7770084 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -6705,7 +6705,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