Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scrolling improvements for aqua #35

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Tk/Widget.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1106,9 +1106,11 @@ sub MouseWheelBind
# events on other platforms.

$mw->Tk::bind($class, '<MouseWheel>',
[ sub { $_[0]->yview('scroll',-($_[1]/120)*3,'units') }, Tk::Ev("D")]);
$mw->windowingsystem eq 'aqua'
? [ sub { $_[0]->yview('scroll',-($_[1]),'units') }, Tk::Ev("D")]
: [ sub { $_[0]->yview('scroll',-($_[1]/120)*3,'units') }, Tk::Ev("D")]);

if ($Tk::platform eq 'unix')
if ($mw->windowingsystem eq 'x11')
{
# Support for mousewheels on Linux/Unix commonly comes through mapping
# the wheel to the extended buttons. If you have a mousewheel, find
Expand Down