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

Mouse wheel message is setting invalid mouse position. #831

Merged
merged 1 commit into from
May 11, 2023

Conversation

castano
Copy link
Contributor

@castano castano commented May 11, 2023

The MOUSEWHEEL messages provide the mouse position in absolute coordinates, so updating it the same way you respond to other mouse messages is not correct. One solution would be to translate the mouse coordinates to client space, but it's not clear to me why this is being updated here.

This problem was introduced recently and my application was working fine before it. I can implement a different workaround if the mouse_update call is necessary for reasons that I'm not aware of. For example, we could pass a flag to transform the coordinates when necessary.

@floooh
Copy link
Owner

floooh commented May 11, 2023

Hmm this was bulk change in this commit, I wasn't aware that the WM_MOUSEWHEEL messages have a different behaviour:

4c6f9cf

I actually need to check whether the other affected messages are also wrong.

@castano
Copy link
Contributor Author

castano commented May 11, 2023

The other messages do not seem to have this problem.

@floooh floooh merged commit 2ae3815 into floooh:master May 11, 2023
25 checks passed
@floooh
Copy link
Owner

floooh commented May 11, 2023

Ok merged! Thanks for spotting this issue and providing a PR. I'll try to look at least into #830 over the next few days (as I said there, need to check the other platforms, if Linux and macOS needs the same fix I'll do it as part of the merge.

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

2 participants