From 681a8298a0fc9b2a8ca64d031792a06d26026a15 Mon Sep 17 00:00:00 2001 From: Christopher Chavez Date: Sun, 21 Jul 2019 05:20:40 -0500 Subject: [PATCH] Allow mousewheel to scroll horizontal scrollbars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …on X11 (Windows is unaffected) Requires horizontal scrolling or shift+vertical scrolling, which more closely matches upstream Tcl/Tk behavior (as of 8.5.15; see scrlbar.tcl) Fixes RT #130109: https://rt.cpan.org/Ticket/Display.html?id=130109 Acked-by: Phil Carmody --- Scrollbar/Scrollbar.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Scrollbar/Scrollbar.pm b/Scrollbar/Scrollbar.pm index 6b416e04..4048bd0b 100644 --- a/Scrollbar/Scrollbar.pm +++ b/Scrollbar/Scrollbar.pm @@ -66,15 +66,14 @@ sub ClassInit $mw->bind($class, '', ['ScrlByPages','hv', 1]); # X11 mousewheel - honour for horizontal too. - $mw->bind($class, '<4>', ['ScrlByUnits','hv',-5]); - $mw->bind($class, '<5>', ['ScrlByUnits','hv', 5]); + $mw->bind($class, '', ['ScrlByUnits','hv',-5]); + $mw->bind($class, '', ['ScrlByUnits','hv', 5]); + $mw->bind($class, '', ['ScrlByUnits','hv',-5]); + $mw->bind($class, '', ['ScrlByUnits','hv', 5]); $mw->bind($class, '', ['ScrlToPos', 0]); $mw->bind($class, '', ['ScrlToPos', 1]); - $mw->bind($class, '<4>', ['ScrlByUnits','v',-3]); - $mw->bind($class, '<5>', ['ScrlByUnits','v', 3]); - return $class; }