diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-10-25 21:06:25 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-10-25 21:06:25 (GMT) |
| commit | 0d5336db012f45753abace489f18f0ca299c6961 (patch) | |
| tree | b1bf3280a9046df99226158978502eeb26f5b0a3 /library/ttk/utils.tcl | |
| parent | e97381a6d921de403516d5b761539a450f4af83c (diff) | |
| parent | 1320b8a2a9c1269a345d44d673a7a35707fbbe9c (diff) | |
| download | tk-core-tip-626.zip tk-core-tip-626.tar.gz tk-core-tip-626.tar.bz2 | |
Merge 9.0core-tip-626
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* |
