summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2003-07-19 01:24:02 (GMT)
committerhobbs <hobbs@noemail.net>2003-07-19 01:24:02 (GMT)
commit514c18f648287cb49bbb3826f418dbfcb60279e9 (patch)
tree879e4f221e78d8a95971f3c185c66b899ff49305 /library
parentf62a5af3eca28bb12b7cd7d04f4a4e61992ca5c3 (diff)
downloadtk-514c18f648287cb49bbb3826f418dbfcb60279e9.zip
tk-514c18f648287cb49bbb3826f418dbfcb60279e9.tar.gz
tk-514c18f648287cb49bbb3826f418dbfcb60279e9.tar.bz2
* library/panedwindow.tcl: use widget-specific Priv slots for
pwAfterId and panecursor items to correctly handle cursor changes with adjacant panedwindows. FossilOrigin-Name: fcdf9693ad76cb3c2194d93998a15efcfc1930db
Diffstat (limited to 'library')
-rw-r--r--library/panedwindow.tcl41
1 files changed, 21 insertions, 20 deletions
diff --git a/library/panedwindow.tcl b/library/panedwindow.tcl
index fd454be..9f83d6e 100644
--- a/library/panedwindow.tcl
+++ b/library/panedwindow.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk panedwindow widgets and
# provides procedures that help in implementing those bindings.
#
-# RCS: @(#) $Id: panedwindow.tcl,v 1.6 2002/08/08 01:43:31 hobbs Exp $
+# RCS: @(#) $Id: panedwindow.tcl,v 1.7 2003/07/19 01:24:02 hobbs Exp $
#
bind Panedwindow <Button-1> { ::tk::panedwindow::MarkSash %W %x %y 1 }
@@ -111,8 +111,8 @@ proc ::tk::panedwindow::Motion {w x y} {
set id [$w identify $x $y]
if {([llength $id] == 2) && \
(!$::tk_strictMotif || [string equal [lindex $id 1] "handle"])} {
- if { ![info exists Priv(panecursor)] } {
- set Priv(panecursor) [$w cget -cursor]
+ if { ![info exists Priv($w,panecursor)] } {
+ set Priv($w,panecursor) [$w cget -cursor]
if { [string equal [$w cget -sashcursor] ""] } {
if { [string equal [$w cget -orient] "horizontal"] } {
$w configure -cursor sb_h_double_arrow
@@ -122,17 +122,17 @@ proc ::tk::panedwindow::Motion {w x y} {
} else {
$w configure -cursor [$w cget -sashcursor]
}
- if {[info exists Priv(pwAfterId)]} {
- after cancel $Priv(pwAfterId)
+ if {[info exists Priv($w,pwAfterId)]} {
+ after cancel $Priv($w,pwAfterId)
}
- set Priv(pwAfterId) [after 150 \
+ set Priv($w,pwAfterId) [after 150 \
[list ::tk::panedwindow::Cursor $w]]
}
return
}
- if { [info exists Priv(panecursor)] } {
- $w configure -cursor $Priv(panecursor)
- unset Priv(panecursor)
+ if { [info exists Priv($w,panecursor)] } {
+ $w configure -cursor $Priv($w,panecursor)
+ unset Priv($w,panecursor)
}
}
@@ -150,15 +150,16 @@ proc ::tk::panedwindow::Motion {w x y} {
#
proc ::tk::panedwindow::Cursor {w} {
variable ::tk::Priv
- if {[info exists Priv(panecursor)]} {
- if {[winfo containing [winfo pointerx $w] [winfo pointery $w]] == $w} {
- set Priv(pwAfterId) [after 150 [list ::tk::panedwindow::Cursor $w]]
+ if {[info exists Priv($w,panecursor)]} {
+ if {[winfo containing [winfo pointerx $w] [winfo pointery $w]] eq $w} {
+ set Priv($w,pwAfterId) [after 150 \
+ [list ::tk::panedwindow::Cursor $w]]
} else {
- $w configure -cursor $Priv(panecursor)
- unset Priv(panecursor)
- if {[info exists Priv(pwAfterId)]} {
- after cancel $Priv(pwAfterId)
- unset Priv(pwAfterId)
+ $w configure -cursor $Priv($w,panecursor)
+ unset Priv($w,panecursor)
+ if {[info exists Priv($w,pwAfterId)]} {
+ after cancel $Priv($w,pwAfterId)
+ unset Priv($w,pwAfterId)
}
}
}
@@ -174,8 +175,8 @@ proc ::tk::panedwindow::Cursor {w} {
# Restores the default cursor
#
proc ::tk::panedwindow::Leave {w} {
- if {[info exists ::tk::Priv(panecursor)]} {
- $w configure -cursor $::tk::Priv(panecursor)
- unset ::tk::Priv(panecursor)
+ if {[info exists ::tk::Priv($w,panecursor)]} {
+ $w configure -cursor $::tk::Priv($w,panecursor)
+ unset ::tk::Priv($w,panecursor)
}
}