summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/listbox.tcl13
-rw-r--r--library/text.tcl13
2 files changed, 20 insertions, 6 deletions
diff --git a/library/listbox.tcl b/library/listbox.tcl
index ff3b549..dcc3cde 100644
--- a/library/listbox.tcl
+++ b/library/listbox.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk listbox widgets
# and provides procedures that help in implementing those bindings.
#
-# RCS: @(#) $Id: listbox.tcl,v 1.13 2002/08/31 06:12:28 das Exp $
+# RCS: @(#) $Id: listbox.tcl,v 1.13.2.1 2004/02/16 23:09:25 wolfsuit Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
@@ -179,8 +179,15 @@ bind Listbox <B2-Motion> {
# someone could use the "event generate" command to produce one
# on other platforms.
-bind Listbox <MouseWheel> {
- %W yview scroll [expr {- (%D / 120) * 4}] units
+if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
+ bind Listbox <MouseWheel> {
+ %W yview scroll [expr {- (%D)}] units
+ }
+} else {
+ bind Listbox <MouseWheel> {
+ %W yview scroll [expr {- (%D / 120) * 4}] units
+ }
}
if {[string equal "x11" [tk windowingsystem]]} {
diff --git a/library/text.tcl b/library/text.tcl
index eb227c2..85d83f1 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk text widgets and provides
# procedures that help in implementing the bindings.
#
-# RCS: @(#) $Id: text.tcl,v 1.24 2002/08/31 06:12:28 das Exp $
+# RCS: @(#) $Id: text.tcl,v 1.24.2.1 2004/02/16 23:09:25 wolfsuit Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -458,8 +458,15 @@ set ::tk::Priv(prevPos) {}
# someone could use the "event generate" command to produce one
# on other platforms.
-bind Text <MouseWheel> {
- %W yview scroll [expr {- (%D / 120) * 4}] units
+if {[string equal [tk windowingsystem] "classic"]
+ || [string equal [tk windowingsystem] "aqua"]} {
+ bind Text <MouseWheel> {
+ %W yview scroll [expr {- (%D)}] units
+ }
+} else {
+ bind Text <MouseWheel> {
+ %W yview scroll [expr {- (%D / 120) * 4}] units
+ }
}
if {[string equal "x11" [tk windowingsystem]]} {