diff options
author | culler <culler> | 2020-04-15 17:42:15 (GMT) |
---|---|---|
committer | culler <culler> | 2020-04-15 17:42:15 (GMT) |
commit | 87b398bc1696bbcd7294aebf2f61dcd36b0e3e82 (patch) | |
tree | be5e5df10749c257bb966c7140b08c62512392fc /library/text.tcl | |
parent | 1199fb12aa7e4ac580c3693185b4297f8d9e4df2 (diff) | |
parent | ef67d7e478dcdd96b095c80fbf1d95330ee35117 (diff) | |
download | tk-87b398bc1696bbcd7294aebf2f61dcd36b0e3e82.zip tk-87b398bc1696bbcd7294aebf2f61dcd36b0e3e82.tar.gz tk-87b398bc1696bbcd7294aebf2f61dcd36b0e3e82.tar.bz2 |
Apply a patch from Christopher Chavez which correctly deals with the fact that Apple uses the middle mouse button for Button 3.
Diffstat (limited to 'library/text.tcl')
-rw-r--r-- | library/text.tcl | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/library/text.tcl b/library/text.tcl index 6d3df8e..28c6c20 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -429,14 +429,27 @@ bind Text <Control-h> { %W see insert } } -bind Text <Button-2> { - if {!$tk_strictMotif} { - tk::TextScanMark %W %x %y +if {[tk windowingsystem] ne "aqua"} { + bind Text <Button-2> { + if {!$tk_strictMotif} { + tk::TextScanMark %W %x %y + } } -} -bind Text <B2-Motion> { - if {!$tk_strictMotif} { - tk::TextScanDrag %W %x %y + bind Text <B2-Motion> { + if {!$tk_strictMotif} { + tk::TextScanDrag %W %x %y + } + } +} else { + bind Text <Button-3> { + if {!$tk_strictMotif} { + tk::TextScanMark %W %x %y + } + } + bind Text <B3-Motion> { + if {!$tk_strictMotif} { + tk::TextScanDrag %W %x %y + } } } set ::tk::Priv(prevPos) {} |