Skip to content

Commit 76bf6ff

Browse files
Tair Sabirgalievpaulusmack
authored andcommitted
gitk: On OSX, bring the gitk window to front
On OSX, Tcl/Tk application windows are created behind all the applications down the stack of windows. This is very annoying, because once a gitk window appears, it's the downmost window and switching to it is pain. The patch is: if we are on OSX, use osascript to bring the current Wish process window to front. Signed-off-by: Tair Sabirgaliev <[email protected]> Thanks-to: Stefan Haller <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent c33cb90 commit 76bf6ff

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

gitk

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11751,6 +11751,15 @@ if {[catch {package require Tk 8.4} err]} {
1175111751
exit 1
1175211752
}
1175311753

11754+
# on OSX bring the current Wish process window to front
11755+
if {[tk windowingsystem] eq "aqua"} {
11756+
exec osascript -e [format {
11757+
tell application "System Events"
11758+
set frontmost of processes whose unix id is %d to true
11759+
end tell
11760+
} [pid] ]
11761+
}
11762+
1175411763
# Unset GIT_TRACE var if set
1175511764
if { [info exists ::env(GIT_TRACE)] } {
1175611765
unset ::env(GIT_TRACE)

0 commit comments

Comments
 (0)