{"thread":{"id":"9283","subject":"[PATCH] gitk: Added support for OS X mouse wheel","startedAt":"2007-07-29T06:38:34Z","lastAt":"2007-07-29T06:38:34Z","messageCount":1,"participants":["Väinö Järvelä"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"48955","messageId":"35284D1E-B5B6-435B-91C3-539395882B95@pp.inet.fi","threadId":"9283","inReplyTo":null,"subject":"[PATCH] gitk: Added support for OS X mouse wheel","fromName":"Väinö Järvelä","fromEmail":"v@pp.inet.fi","sentAt":"2007-07-29T06:38:34Z","receivedAt":"2007-07-29T06:38:34Z","isPatch":true,"sender":{"key":"v@pp.inet.fi","avatar":null},"body":"MacBook doesn't seem to recognize MouseRelease-4 and -5 events, at all.\nSo i added a support for the MouseWheel event, which i limited to Tcl/tk\naqua, as i couldn't test it neither on Linux or Windows. Tcl/tk needs to\nbe updated from the version that is shipped with OS X 10.4 Tiger, for\nthis patch to work.\n\nSigned-off-by: Väinö Järvelä <v@pp.inet.fi>\n---\ngitk |    6 ++++++\n1 files changed, 6 insertions(+), 0 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex f74ce51..985c30a 100755\n--- a/gitk\n+++ b/gitk\n@@ -825,6 +825,12 @@ proc makewindow {} {\n      #bindall <B1-Motion> {selcanvline %W %x %y}\n      bindall <ButtonRelease-4> \"allcanvs yview scroll -5 units\"\n      bindall <ButtonRelease-5> \"allcanvs yview scroll 5 units\"\n+    if {[tk windowingsystem] eq \"aqua\"} {\n+        bindall <MouseWheel> {\n+                set delta [expr {- (%D)}]\n+                allcanvs yview scroll $delta units\n+        }\n+    }\n      bindall <2> \"canvscan mark %W %x %y\"\n      bindall <B2-Motion> \"canvscan dragto %W %x %y\"\n      bindkey <Home> selfirstline\n--\n1.5.2\n"}]}