From 22c2db4c168ffe6899ac7cd2795d98c927063395 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 20 Oct 1999 01:02:24 +0000 Subject: * library/scrlbar.tcl: changed tkScrollButtonUp to check for existence of tkPriv(relief) in order to avoid spurious release events --- library/scrlbar.tcl | 11 +++++++---- 1 file 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 -- -- cgit v0.12