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

macOS: scroll event handling #110

Merged
merged 2 commits into from Nov 13, 2022
Merged

Conversation

ingo-dsp
Copy link

@ingo-dsp ingo-dsp commented Jan 17, 2022

Adds handling of mouse scrolling using the mouse wheel or touch pad for macOS. Although basic event handling for macOS had been added before in #52, it looks to me like support for this was still missing. I had a look at all other public forks of this library and could not find someone working on this.

So I looked up the API documentation for it [1] and had a look at the existing code for mouse_move to make a change that feels consistent with the existing code. There seem to be two kinds of scroll delta values [2] [3] [4], precise and imprecise ones. I expect the precise deltas to be used when a touchpad is used and the imprecise ones if a mouse wheel is use. But I can only test the mouse wheel scenario, as I have a desktop computer and thus no touch pad to test with.

If this is something you'd like to merge, feel free to do so. If this code needs to be improved, give me feedback and I will try to address it or just make adjustments yourself. But if you have other plans and do not want to merge this, that's fine too.

[1] https://developer.apple.com/documentation/appkit/nsresponder/1534192-scrollwheel?language=objc
[2] https://developer.apple.com/documentation/appkit/nsevent/1525758-hasprecisescrollingdeltas
[3] https://developer.apple.com/documentation/appkit/nsevent/1524505-scrollingdeltax

@ingo-dsp ingo-dsp changed the title Add scrollwheel support for macos macOS: scroll event handling Jan 17, 2022
@wrl wrl merged commit eeded04 into RustAudio:master Nov 13, 2022
@wrl
Copy link
Member

wrl commented Nov 13, 2022

thanks! sorry this took so long to merge 😅

@ingo-budde
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants