Skip to content

Commit 7c06c19

Browse files
committed
gitk: use <Button-3> for ctx menus on macOS with Tcl 8.7+
Commit d277e89 added special handling on macOS (OS X) that makes button 2 the right mouse button. As per TIP 474 [1], Tcl 8.7 has swapped buttons 2 and 3 such that button 3 is made the right mouse button as in other platforms. Therefore, the logic should be updated to use button 3 on macOS with Tcl 8.7+. [1]: https://core.tcl-lang.org/tips/doc/main/tip/474.md Signed-off-by: Ruoyu Zhong <[email protected]>
1 parent 93ff79e commit 7c06c19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12596,7 +12596,7 @@ set foundbgcolor yellow
1259612596
set currentsearchhitbgcolor orange
1259712597
1259812598
# button for popping up context menus
12599-
if {[tk windowingsystem] eq "aqua"} {
12599+
if {[tk windowingsystem] eq "aqua" && [package vcompare $::tcl_version 8.7] < 0} {
1260012600
set ctxbut <Button-2>
1260112601
} else {
1260212602
set ctxbut <Button-3>

0 commit comments

Comments
 (0)