diff options
Diffstat (limited to 'library/spinbox.tcl')
-rw-r--r-- | library/spinbox.tcl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/library/spinbox.tcl b/library/spinbox.tcl index 54331ed..e30c215 100644 --- a/library/spinbox.tcl +++ b/library/spinbox.tcl @@ -398,9 +398,13 @@ proc ::tk::spinbox::ButtonDown {w x y} { focus $w if {"readonly" ne [$w cget -state]} { if {$::tk::sdltk} { - lassign [$w bbox insert] x y - incr x [winfo rootx $w] - incr y [winfo rooty $w] + if {[catch { + lassign [$w bbox insert] x y + incr x [winfo rootx $w] + incr y [winfo rooty $w] + }]} { + lassign [winfo pointerxy $w] x y + } sdltk textinput 1 $x $y } } |