From 74d4360d00d7d7a03fe6527d87e17e9fc64db32b Mon Sep 17 00:00:00 2001 From: Kevin Walzer Date: Sun, 25 Aug 2013 03:04:43 +0000 Subject: Fix for 3016181, thanks to Tom Goddard for patch --- library/tk.tcl | 29 ++++++++++++++--------------- macosx/tkMacOSXScrlbr.c | 2 ++ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/library/tk.tcl b/library/tk.tcl index 267a7bb..06902f9 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -379,9 +379,8 @@ switch -exact -- [tk windowingsystem] { event add <> event add <> event add <> - if {[info exists tcl_platform(os)] && $tcl_platform(os) eq "Darwin"} { - event add <> - } + # On Darwin/Aqua, buttons from left to right are 1,3,2. On Darwin/X11 with recent + # XQuartz as the X server, they are 1,2,3; other X servers may differ. event add <> event add <> @@ -457,10 +456,10 @@ switch -exact -- [tk windowingsystem] { event add <> } "aqua" { - event add <> - event add <> - event add <> - event add <> + event add <> + event add <> + event add <> + event add <> event add <> event add <> @@ -468,24 +467,24 @@ switch -exact -- [tk windowingsystem] { # See http://support.apple.com/kb/HT1343 event add <> event add <> - event add <> - event add <> + event add <> + event add <> event add <> - event add <> + event add <> event add <> - event add <> + event add <> event add <> event add <> event add <> event add <> event add <> - event add <> + event add <> event add <> - event add <> + event add <> event add <> - event add <> + event add <> event add <> - event add <> + event add <> # Not official, but logical extensions of above. Also derived from # bindings present in MS Word on OSX. event add <> diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index 77b89e7..ac71d8e 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -254,6 +254,8 @@ TkpDestroyScrollbar( TkScrollbar *scrollPtr) { MacScrollbar *macScrollPtr = (MacScrollbar *) scrollPtr; + NSScroller *scroller = macScrollPtr->scroller; + [scroller setTag:(NSInteger)0]; TkMacOSXMakeCollectableAndRelease(macScrollPtr->scroller); } -- cgit v0.12