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

Don't set the raw mouse motion input mode on macOS #48

Closed
wants to merge 1 commit into from

Conversation

moomba42
Copy link

Currently if you try to use the setInputModeCursor function on macOS, then GLFW will produce the following error.PlatformError: "Raw mouse motion is not supported on this system". This happens for every possible value parameter.
By checking if the platform is macOS, we can avoid this error.

Tested on Macbook Pro M1 with macOS Sonoma 14.5.

  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.

@castholm
Copy link
Collaborator

castholm commented Dec 3, 2024

I don't know the full context behind the original change, but I think it's a bit dubious that setInputModeCursor enables/disables the raw mouse motion mode in the first place. If the original GLFW doesn't, then why should the binding?

@xdBronch, it looks like you made the original change in 8e091ce (hexops/mach#795). Do you remember why the change was made originally, and do you think it would make sense to revert it? I figure that users who want both could call e.g.
window.setInputModeCursor(.disabled) followed by window.setInputModeRawMouseMotion(true) just like they would with the original C API.

@xdBronch
Copy link
Contributor

xdBronch commented Dec 3, 2024

the original discussion was on discord here https://discord.com/channels/996677443681267802/999727330660462704/1114485031797264425
but rereading it im struggling to understand what exactly my motivation was or why it was like this. just making people call both functions sounds fairly reasonable to me but i havent used glfw in quite a while so i couldnt tell you whats the best API

@castholm castholm closed this in #50 Dec 19, 2024
@moomba42 moomba42 deleted the macos-raw-mouse-motion branch January 1, 2025 22:14
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.

3 participants