Attachment "dc8ba1dd.patch" to
ticket [dc8ba1dd]
added by
chrstphrchvz
2019-07-15 08:42:37.
diff --git library/demos/menu.tcl library/demos/menu.tcl
index a788a6540..e2118ffc0 100644
--- library/demos/menu.tcl
+++ library/demos/menu.tcl
@@ -56,7 +56,7 @@ menu $m -tearoff 0
$m add command -label "Long entry that does nothing"
if {[tk windowingsystem] eq "aqua"} {
set modifier Command
-} elseif {[tk windowingsystem] == "win32"} {
+} elseif {[tk windowingsystem] eq "win32"} {
set modifier Control
} else {
set modifier Meta
diff --git library/demos/widget library/demos/widget
index 6d0b04560..818e33405 100644
--- library/demos/widget
+++ library/demos/widget
@@ -109,7 +109,7 @@ if {[tk windowingsystem] ne "aqua"} {
-command {tkAboutDialog} -accelerator [mc "<F1>"]
bind . <F1> {tkAboutDialog}
.menuBar.file add sep
- if {[string match win* [tk windowingsystem]]} {
+ if {[tk windowingsystem] eq "win32"} {
# Windows doesn't usually have a Meta key
::tk::AmpMenuArgs .menuBar.file add command -label [mc "&Quit"] \
-command {exit} -accelerator [mc "Ctrl+Q"]
diff --git tests/canvImg.test tests/canvImg.test
index 36e937d85..6c9f3e4ef 100644
--- tests/canvImg.test
+++ tests/canvImg.test
@@ -727,7 +727,7 @@ test canvImg-9.1 {DisplayImage procedure} -constraints testImageType -setup {
image delete foo
} -result {75 150 105 165}
-if {[tk windowingsystem] == "aqua" && $tcl_platform(osVersion) > 18} {
+if {[tk windowingsystem] eq "aqua" && $tcl_platform(osVersion) > 18} {
# Aqua >= 10.14 will redraw the entire image.
set result_10_1 {{foo display 0 0 30 15}}
} else {
@@ -779,7 +779,7 @@ test canvImg-11.2 {ImageChangedProc procedure} -constraints {
.c delete all
image delete foo
} -result {30 75 70 125}
-if {[tk windowingsystem] == "aqua" && $tcl_platform(osVersion) > 18} {
+if {[tk windowingsystem] eq "aqua" && $tcl_platform(osVersion) > 18} {
# Aqua >= 10.14 will redraw the entire image.
set result_11_3 {{foo2 display 0 0 80 60}}
} else {
diff --git tests/image.test tests/image.test
index 5842ce347..0683036ff 100644
--- tests/image.test
+++ tests/image.test
@@ -355,7 +355,7 @@ test image-8.1 {Tk_ImageCmd procedure, "inuse" option} -constraints {
catch {destroy .b}
} -result [list 0 1]
-if {[tk windowingsystem] == "aqua" && $tcl_platform(osVersion) > 18} {
+if {[tk windowingsystem] eq "aqua" && $tcl_platform(osVersion) > 18} {
# Aqua >= 10.14 will redraw the entire image in drawRect.
set result_9_1 {{foo display 0 0 30 15}}
} else {
@@ -384,7 +384,7 @@ test image-9.1 {Tk_ImageChanged procedure} -constraints testImageType -setup {
.c delete all
imageCleanup
} -result $result_9_1
-if {[tk windowingsystem] == "aqua" && $tcl_platform(osVersion) > 18} {
+if {[tk windowingsystem] eq "aqua" && $tcl_platform(osVersion) > 18} {
# Aqua >= 10.14 will redraw the entire image.
set result_9_2 {{foo display 0 0 30 15} {foo display 0 0 30 15}}
} else {
diff --git tests/menubut.test tests/menubut.test
index 4ac5d9281..967023b82 100644
--- tests/menubut.test
+++ tests/menubut.test
@@ -542,7 +542,7 @@ test menubutton-6.1 {MenuButtonCmdDeletedProc procedure} -setup {
deleteWindows
} -result {{} {}}
-if {[tk windowingsystem] == "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
set extraWidth 36
} else {
set extraWidth 0
diff --git tests/text.test tests/text.test
index 5b2d7e32d..1e5ffd785 100644
--- tests/text.test
+++ tests/text.test
@@ -3475,7 +3475,7 @@ test text-14.18 {ConfigureText procedure} -constraints fonts -setup {
# The "overrideredirect" gets rid of the titlebar so the toplevel can shrink
# to the appropriate size.
# On macOS, however, there is no way to make the window overlap the menubar.
-if {[tk windowingsystem] == "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
set minY 23
} else {
set minY 0
diff --git tests/unixWm.test tests/unixWm.test
index 28c81595f..1d6907d41 100644
--- tests/unixWm.test
+++ tests/unixWm.test
@@ -24,7 +24,7 @@ proc sleep ms {
# wait for the animation to finish.
proc animationDelay {} {
- if {[tk windowingsystem] == "aqua"} {
+ if {[tk windowingsystem] eq "aqua"} {
sleep 250
}
}
@@ -823,7 +823,7 @@ test unixWm-22.2 {Tk_WmCmd procedure, "iconbitmap" option} {unix testwrapper} {
WM_HINTS] 0]]]
lappend result [wm iconbitmap .t] $bit
} {{} questhead 0x4 {} 0x0}
-if {[tk windowingsystem] == "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
set result_22_3 {0 {}}
} else {
set result_22_3 {1 {bitmap "bad-bitmap" not defined}}
@@ -1234,7 +1234,7 @@ test unixWm-34.2 {Tk_WmCmd procedure, "sizefrom" option} {unix testwrapper} {
test unixWm-34.3 {Tk_WmCmd procedure, "sizefrom" option} unix {
list [catch {wm sizefrom .t none} msg] $msg
} {1 {bad argument "none": must be program or user}}
-if {[tk windowingsystem] == "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
set result_35_1 {1 {bad argument "1": must be normal, iconic, withdrawn, or zoomed}}
} else {
set result_35_1 {1 {bad argument "1": must be normal, iconic, or withdrawn}}
@@ -1795,7 +1795,7 @@ test unixWm-49.2 {Tk_GetRootCoords procedure, menubars} {unix testmenubar} {
deleteWindows
wm withdraw .
-if {[tk windowingsystem] == "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
# Modern mac windows have no border.
set result_50_1 {{} {} .t .t .t2 {} .t2 .t .t}
} else {
@@ -2103,7 +2103,7 @@ test unixWm-51.8 {TkWmRestackToplevel procedure, overrideredirect windows} unix
lappend result [winfo containing $x $y]
} {.t2 .t .t2}
# The mac won't put an overrideredirect window above the root,
-if {[tk windowingsystem] == "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
wm withdraw .
}
test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect} unix {
@@ -2130,7 +2130,7 @@ test unixWm-51.9 {TkWmRestackToplevel procedure, other window overrideredirect}
lower .t2
lappend result [winfo containing $x $y]
} {.t2 .t3}
-if {[tk windowingsystem] == "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
wm deiconify .
}
test unixWm-51.10 {TkWmRestackToplevel procedure, don't move window that's already in the right place} unix {
@@ -2508,7 +2508,7 @@ test unixWm-59.3 {exit processing} unix {
# NOTE: since [wm attributes] is not guaranteed to have any effect,
# the only thing we can really test here is the syntax.
#
-if {[tk windowingsystem] == "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
set result_60_1 {-alpha 1.0 -fullscreen 0 -modified 0 -notify 0\
-titlepath {} -topmost 0 -transparent 0\
-type unsupported}
diff --git tests/winfo.test tests/winfo.test
index 49a92a6ac..d758fc916 100644
--- tests/winfo.test
+++ tests/winfo.test
@@ -396,7 +396,7 @@ test winfo-13.1 {root coordinates of embedded toplevel} -setup {
# Windows does not destroy the container when an embedded window is
# destroyed. Unix and macOS do destroy it. See ticket [67384bce7d].
-if {[tk windowingsystem] == "win32"} {
+if {[tk windowingsystem] eq "win32"} {
set result_13_2 {embedded 0 container 1}
} else {
set result_13_2 {embedded 0 container 0}