diff options
author | hobbs <hobbs> | 2003-07-19 01:22:14 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2003-07-19 01:22:14 (GMT) |
commit | 0a8e7328a8ae8606660f497e79afacab3b3456da (patch) | |
tree | 9a2ba061b38dd03b9b23dc76adfb2e58922d74b2 | |
parent | ca922fad9db6330c595a1bbd3f9dddb4087e8719 (diff) | |
download | tk-0a8e7328a8ae8606660f497e79afacab3b3456da.zip tk-0a8e7328a8ae8606660f497e79afacab3b3456da.tar.gz tk-0a8e7328a8ae8606660f497e79afacab3b3456da.tar.bz2 |
* library/panedwindow.tcl: use widget-specific Priv slots for
pwAfterId and panecursor items to correctly handle cursor changes
with adjacant panedwindows.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | library/panedwindow.tcl | 41 |
2 files changed, 25 insertions, 20 deletions
@@ -5,6 +5,10 @@ 2003-07-18 Jeff Hobbs <jeffh@ActiveState.com> + * library/panedwindow.tcl: use widget-specific Priv slots for + pwAfterId and panecursor items to correctly handle cursor changes + with adjacant panedwindows. + * generic/tkEvent.c (Tk_HandleEvent): correct XCreateIC call for TK_XIM_SPOT usage. [Bug 742660] (takahashi) diff --git a/library/panedwindow.tcl b/library/panedwindow.tcl index fd454be..3298aba 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.6.2.1 2003/07/19 01:22:15 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) } } |