| Ticket UUID: | 932155 | |||
| Title: | Sash misbehavior | |||
| Type: | Bug | Version: | obsolete: 8.4.6 | |
| Submitter: | bgriffin | Created on: | 2004-04-09 02:32:22 | |
| Subsystem: | 21. [panedwindow] | Assigned To: | hobbs | |
| Priority: | 8 | Severity: | ||
| Status: | Closed | Last Modified: | 2004-05-04 02:37:37 | |
| Resolution: | Fixed | Closed By: | hobbs | |
| Closed on: | 2004-05-03 19:37:37 | |||
| Description: |
If you have more than 1 sash (i.e more than 2 panes)
and a drag is performed on one sash (causing the proxy
to be placed) and then, on a different sash, a
<Button-1> event followed by a <ButtonRelease-1> event
with no intervening <B1-Motion> event, the sash will
jump to the last proxy location.
To fix this, the <Button-1> event must initialize the
proxy location so that if there is no drag, the button
release will cause no movement of the sash. This can
be done by explicitly calling the DragSash function
from the MarkSash function:
proc ::tk::panedwindow::MarkSash {w x y proxy} {
set what [$w identify $x $y]
if { [llength $what] == 2 } {
foreach {index which} $what break
if { !$::tk_strictMotif || [string equal $which
"handle"] } {
if {!$proxy} { $w sash mark $index $x $y }
set ::tk::Priv(sash) $index
foreach {sx sy} [$w sash coord $index] break
set ::tk::Priv(dx) [expr {$sx-$x}]
set ::tk::Priv(dy) [expr {$sy-$y}]
# Do this to init the proxy location
DragSash $w $x $y $proxy
}
}
}
This bug exists on the top of trunk (8.5) as well.
-Brian
| |||
| User Comments: |
hobbs added on 2004-05-04 02:37:37:
Logged In: YES user_id=72656 commited to 8-4-branch and head 2004-05-03. bgriffin added on 2004-04-15 12:24:05: File Added - 83779: panesashbug.tcl Logged In: YES user_id=22949 attached testcase! -Brian dkf added on 2004-04-14 15:40:40: Logged In: YES user_id=79902 Err, that didn't work. (Stupid SF patch upload API.) bgriffin added on 2004-04-14 10:40:38: Logged In: YES user_id=22949 Attached is a testcase that exhibits the bug without interaction. -Brian dkf added on 2004-04-13 16:02:14: Logged In: YES user_id=79902 Is there a way to get a non-interactive test for this working before we fix it? | |||
Attachments:
- panesashbug.tcl [download] added by bgriffin on 2004-04-15 12:24:05. [details]