summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorculler <culler>2020-07-20 19:29:50 (GMT)
committerculler <culler>2020-07-20 19:29:50 (GMT)
commit9e0d2cb617925089f693835cd6194fdf6bf9d4ed (patch)
tree92be2fcd588e8fbe59961231775a106b0d518cfb /tests
parent89b2b18cf0b4474ca6d3c7cb4b666037cfab8380 (diff)
parenta9de5cde4d9e25fecc883152264797d1e3ee622a (diff)
downloadtk-9e0d2cb617925089f693835cd6194fdf6bf9d4ed.zip
tk-9e0d2cb617925089f693835cd6194fdf6bf9d4ed.tar.gz
tk-9e0d2cb617925089f693835cd6194fdf6bf9d4ed.tar.bz2
Aqua: fix unixWm tests broken by the larger menubar in Big Sur
Diffstat (limited to 'tests')
-rw-r--r--tests/unixWm.test25
1 files changed, 13 insertions, 12 deletions
diff --git a/tests/unixWm.test b/tests/unixWm.test
index 28c8159..b6efb42 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -46,9 +46,10 @@ proc makeToplevels {} {
# larger than the height of the menubar (normally 23 pixels).
if {[tk windowingsystem] eq "aqua"} {
- set Y0 23
- set Y2 25
- set Y5 28
+ set mb [expr [menubarheight] + 1]
+ set Y0 $mb
+ set Y2 [expr $mb + 2]
+ set Y5 [expr $mb + 5]
} else {
set Y0 0
set Y2 2
@@ -56,7 +57,7 @@ if {[tk windowingsystem] eq "aqua"} {
}
set i 1
-foreach geom "+23+80 +80+23 +0+$Y0" {
+foreach geom "+$Y0+80 +80+$Y0 +0+$Y0" {
destroy .t
test unixWm-1.$i {initial window position} unix {
toplevel .t -width 200 -height 150
@@ -82,7 +83,7 @@ update
scan [wm geom .t] %dx%d+%d+%d width height x y
set xerr [expr 150-$x]
set yerr [expr 150-$y]
-foreach geom "+20+80 +80+23 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" {
+foreach geom "+20+80 +80+$Y0 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" {
test unixWm-2.$i {moving window while mapped} unix {
wm geom .t $geom
update
@@ -94,7 +95,7 @@ foreach geom "+20+80 +80+23 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" {
}
set i 1
-foreach geom "+20+80 +80+23 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" {
+foreach geom "+20+80 +80+$Y0 +0+$Y0 -0-0 +0-0 -0+$Y0 -10-5 -10+$Y5 +10-5" {
test unixWm-3.$i {moving window while iconified} unix {
wm iconify .t
sleep 200
@@ -194,27 +195,27 @@ test unixWm-5.7 {compounded state changes} {unix nonPortable} {
destroy .t
toplevel .t -width 200 -height 100
-wm geom .t +10+23
+wm geom .t +10+$Y0
wm minsize .t 1 1
update
test unixWm-6.1 {size changes} unix {
.t config -width 180 -height 150
update
wm geom .t
-} 180x150+10+23
+} 180x150+10+$Y0
test unixWm-6.2 {size changes} unix {
wm geom .t 250x60
.t config -width 170 -height 140
update
wm geom .t
-} 250x60+10+23
+} 250x60+10+$Y0
test unixWm-6.3 {size changes} unix {
wm geom .t 250x60
.t config -width 170 -height 140
wm geom .t {}
update
wm geom .t
-} 170x140+10+23
+} 170x140+10+$Y0
test unixWm-6.4 {size changes} {unix nonPortable userInteraction} {
wm minsize .t 1 1
update
@@ -1953,13 +1954,13 @@ test unixWm-50.7 {Tk_CoordsToWindow procedure, more basics} unix {
test unixWm-50.8 {Tk_CoordsToWindow procedure, more basics} unix {
destroy .t
toplevel .t -width 400 -height 300 -bg green
- wm geom .t +0+0
+ wm geom .t +0+30
frame .t.f -width 200 -height 100 -bd 2 -relief raised
place .t.f -x 100 -y 100
frame .t.f.f -width 200 -height 100 -bd 2 -relief raised
place .t.f.f -x 100 -y 0
update
- set x [winfo rooty .t]
+ set x [winfo rootx .t]
set y [expr [winfo rooty .t] + 150]
list [winfo containing [expr $x + 50] $y] \
[winfo containing [expr $x + 150] $y] \