@@ -2166,7 +2166,8 @@ proc makewindow {} {
2166
2166
bind $cflist <1> {sel_flist %W %x %y; break }
2167
2167
bind $cflist <B1-Motion> {sel_flist %W %x %y; break }
2168
2168
bind $cflist <ButtonRelease-1> {treeclick %W %x %y}
2169
- bind $cflist <Button-3> {pop_flist_menu %W %X %Y %x %y}
2169
+ global ctxbut
2170
+ bind $cflist $ctxbut {pop_flist_menu %W %X %Y %x %y}
2170
2171
2171
2172
set maincursor [. cget -cursor]
2172
2173
set textcursor [$ctext cget -cursor]
@@ -4919,7 +4920,7 @@ proc drawcmittext {id row col} {
4919
4920
global rowtextx idpos idtags idheads idotherrefs
4920
4921
global linehtag linentag linedtag selectedline
4921
4922
global canvxmax boldrows boldnamerows fgcolor
4922
- global mainheadid nullid nullid2 circleitem circlecolors
4923
+ global mainheadid nullid nullid2 circleitem circlecolors ctxbut
4923
4924
4924
4925
# listed is 0 for boundary, 1 for normal, 2 for negative, 3 for left, 4 for right
4925
4926
set listed $cmitlisted($curview,$id)
@@ -4992,7 +4993,7 @@ proc drawcmittext {id row col} {
4992
4993
}
4993
4994
set linehtag($row ) [$canv create text $xt $y -anchor w -fill $fgcolor \
4994
4995
-text $headline -font $font -tags text]
4995
- $canv bind $linehtag($row) <Button-3> " rowmenu %X %Y $id "
4996
+ $canv bind $linehtag($row) $ctxbut " rowmenu %X %Y $id "
4996
4997
set linentag($row ) [$canv2 create text 3 $y -anchor w -fill $fgcolor \
4997
4998
-text $name -font $nfont -tags text]
4998
4999
set linedtag($row ) [$canv3 create text 3 $y -anchor w -fill $fgcolor \
@@ -5334,7 +5335,7 @@ proc bindline {t id} {
5334
5335
proc drawtags {id x xt y1} {
5335
5336
global idtags idheads idotherrefs mainhead
5336
5337
global linespc lthickness
5337
- global canv rowtextx curview fgcolor bgcolor
5338
+ global canv rowtextx curview fgcolor bgcolor ctxbut
5338
5339
5339
5340
set marks {}
5340
5341
set ntags 0
@@ -5412,7 +5413,7 @@ proc drawtags {id x xt y1} {
5412
5413
if {$ntags >= 0} {
5413
5414
$canv bind $t <1> [list showtag $tag 1]
5414
5415
} elseif {$nheads >= 0} {
5415
- $canv bind $t <Button-3> [list headmenu %X %Y $id $tag ]
5416
+ $canv bind $t $ctxbut [list headmenu %X %Y $id $tag ]
5416
5417
}
5417
5418
}
5418
5419
return $xt
@@ -9851,6 +9852,13 @@ set selectbgcolor gray85
9851
9852
9852
9853
set circlecolors {white blue gray blue blue}
9853
9854
9855
+ # button for popping up context menus
9856
+ if {[tk windowingsystem] eq " aqua" } {
9857
+ set ctxbut <Button-2>
9858
+ } else {
9859
+ set ctxbut <Button-3>
9860
+ }
9861
+
9854
9862
# # For msgcat loading, first locate the installation location.
9855
9863
if { [info exists ::env(GITK_MSGSDIR)] } {
9856
9864
# # Msgsdir was manually set in the environment.
0 commit comments