diff options
Diffstat (limited to 'library/ttk/utils.tcl')
| -rw-r--r-- | library/ttk/utils.tcl | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/library/ttk/utils.tcl b/library/ttk/utils.tcl index 3f6446d..a0af39d 100644 --- a/library/ttk/utils.tcl +++ b/library/ttk/utils.tcl @@ -46,7 +46,7 @@ proc ttk::GuessTakeFocus {w} { } ## ttk::traverseTo $w -- -# Set the keyboard focus to the specified window. +# Set the keyboard focus to the specified window. # proc ttk::traverseTo {w} { set focus [focus] @@ -119,7 +119,7 @@ proc ttk::focusFirst {w} { # See #1239190 and #1411983 for more discussion. # namespace eval ttk { - variable Grab ;# map: window name -> grab token + variable Grab ;# map: window name -> grab token # grab token details: # Two-element list containing: @@ -304,15 +304,14 @@ bind TtkScrollable <Shift-Option-MouseWheel> \ ## Touchpad scrolling # bind TtkScrollable <TouchpadScroll> { - if {%# %% 5 != 0} { - return - } - lassign [tk::PreciseScrollDeltas %D] deltaX deltaY - if {$deltaX != 0} { - %W xview scroll [expr {-$deltaX}] units - } - if {$deltaY != 0} { - %W yview scroll [expr {-$deltaY}] units + if {%# %% 5 == 0} { + lassign [tk::PreciseScrollDeltas %D] tk::Priv(deltaX) tk::Priv(deltaY) + if {$tk::Priv(deltaX) != 0} { + %W xview scroll [expr {-$tk::Priv(deltaX)}] units + } + if {$tk::Priv(deltaY) != 0} { + %W yview scroll [expr {-$tk::Priv(deltaY)}] units + } } } #*EOF* |
