From 7c06c19e66e7654031eb50b72fd79c380fa54158 Mon Sep 17 00:00:00 2001 From: Ruoyu Zhong Date: Sun, 24 Aug 2025 18:07:58 +0800 Subject: [PATCH] gitk: use for ctx menus on macOS with Tcl 8.7+ Commit d277e89f87fda01daa1e1a35fc1f7118678faa1f 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 --- gitk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitk b/gitk index 3b6acfc592..2e1b629d7d 100755 --- a/gitk +++ b/gitk @@ -12596,7 +12596,7 @@ set foundbgcolor yellow set currentsearchhitbgcolor orange # button for popping up context menus -if {[tk windowingsystem] eq "aqua"} { +if {[tk windowingsystem] eq "aqua" && [package vcompare $::tcl_version 8.7] < 0} { set ctxbut } else { set ctxbut -- 2.47.3