@@ -12288,13 +12288,15 @@ if {[catch {package require Tk 8.4} err]} {
exit 1
}
-# on OSX bring the current Wish process window to front
+# on macOS bring the current Wish process window to front if needed
if {[tk windowingsystem] eq "aqua"} {
- exec osascript -e [format {
- tell application "System Events"
- set frontmost of processes whose unix id is %d to true
- end tell
- } [pid] ]
+ if {$tcl_version < 8.6} {
+ exec osascript -e [format {
+ tell application "System Events"
+ set frontmost of processes whose unix id is %d to true
+ end tell
+ } [pid] ]
+ }
}
# Unset GIT_TRACE var if set
76bf6ff (gitk: On OSX, bring the gitk window to front, 2013-04-24) adds an osascript to set the gitk window to the front to workaround and unfortunate default in older tk versions to add it to the back. tk 8.6 or newer do not need that workaround so add a conditional check to skip it and while at it update the comment with the new name for the OS. Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> --- gitk | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)