diff --git a/git-gui.sh b/git-gui.sh index e133331ef..703175975 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -135,6 +135,20 @@ proc strcat {args} { ::msgcat::mcload $oguimsg unset oguimsg +###################################################################### +## +## On Mac, bring the current Wish process window to front + +if {[tk windowingsystem] eq "aqua"} { + catch { + exec osascript -e [format { + tell application "System Events" + set frontmost of processes whose unix id is %d to true + end tell + } [pid]] + } +} + ###################################################################### ## ## read only globals