summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-10-20 01:02:24 (GMT)
committerhobbs <hobbs>1999-10-20 01:02:24 (GMT)
commit22c2db4c168ffe6899ac7cd2795d98c927063395 (patch)
treefd9b072896cceacc59d60c2183adb6c898acb179
parentf7925633cbd64471aa557e92f83502d7417097d6 (diff)
downloadtk-22c2db4c168ffe6899ac7cd2795d98c927063395.zip
tk-22c2db4c168ffe6899ac7cd2795d98c927063395.tar.gz
tk-22c2db4c168ffe6899ac7cd2795d98c927063395.tar.bz2
* library/scrlbar.tcl: changed tkScrollButtonUp to check for
existence of tkPriv(relief) in order to avoid spurious release events
-rw-r--r--library/scrlbar.tcl11
1 files changed, 7 insertions, 4 deletions
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl
index d33121b..31c940c 100644
--- a/library/scrlbar.tcl
+++ b/library/scrlbar.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk scrollbar widgets.
# It also provides procedures that help in implementing the bindings.
#
-# RCS: @(#) $Id: scrlbar.tcl,v 1.6 1999/09/02 17:02:53 hobbs Exp $
+# RCS: @(#) $Id: scrlbar.tcl,v 1.7 1999/10/20 01:02:24 hobbs Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -164,9 +164,12 @@ proc tkScrollButtonDown {w x y} {
proc tkScrollButtonUp {w x y} {
global tkPriv
tkCancelRepeat
- $w configure -activerelief $tkPriv(relief)
- tkScrollEndDrag $w $x $y
- $w activate [$w identify $x $y]
+ if {[info exists tkPriv(relief)]} {
+ # Avoid error due to spurious release events
+ $w configure -activerelief $tkPriv(relief)
+ tkScrollEndDrag $w $x $y
+ $w activate [$w identify $x $y]
+ }
}
# tkScrollSelect --