From 5dd57d512225bb82aa0010b39aaec0085d471eac Mon Sep 17 00:00:00 2001 From: Jonathan del Strother Date: Mon, 15 Oct 2007 10:33:07 +0100 Subject: [PATCH] gitk: Add support for OS X mouse wheel MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit (Väinö Järvelä supplied this patch a while ago for 1.5.2. It no longer applied cleanly, so I'm reposting it.) MacBook doesn't seem to recognize MouseRelease-4 and -5 events, at all. So i added a support for the MouseWheel event, which i limited to Tcl/tk aqua, as i couldn't test it neither on Linux or Windows. Tcl/tk needs to be updated from the version that is shipped with OS X 10.4 Tiger, for this patch to work. Signed-off-by: Jonathan del Strother Signed-off-by: Shawn O. Pearce --- gitk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gitk b/gitk index 999e3c218..46673e3b9 100755 --- a/gitk +++ b/gitk @@ -843,6 +843,12 @@ proc makewindow {} { } else { bindall "allcanvs yview scroll -5 units" bindall "allcanvs yview scroll 5 units" + if {[tk windowingsystem] eq "aqua"} { + bindall { + set delta [expr {- (%D)}] + allcanvs yview scroll $delta units + } + } } bindall <2> "canvscan mark %W %x %y" bindall "canvscan dragto %W %x %y" -- 2.30.2