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

Fix update mouse cursor state wrong mouse position #94987

Merged

Conversation

kitbdev
Copy link
Contributor

@kitbdev kitbdev commented Jul 31, 2024

mouse_default_cursor_shape called update_mouse_cursor_state() which was sending the wrong position when updating the mouse, since it wasn't marked as local and gets transformed.

Also the behavior is buggy even before #85313, so its not the root cause. The wrong mouse position being sent can be seen in v4.0.4.stable.official [fc0b241] as well.

@kitbdev kitbdev requested a review from a team as a code owner July 31, 2024 18:20
@akien-mga akien-mga requested a review from a team July 31, 2024 20:16
@akien-mga akien-mga added this to the 4.4 milestone Jul 31, 2024
Copy link
Contributor

@Sauermann Sauermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change makes perfect sense. get_mouse_position() returns the position in viewport coordinates.
This was an oversight in #58995.

@akien-mga akien-mga modified the milestones: 4.4, 4.3 Jul 31, 2024
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm this fully fixes the bug, both the "regression" which I bisected, and the previously also broken behavior in 4.2-stable.

@akien-mga akien-mga merged commit b6dee96 into godotengine:master Jul 31, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@kitbdev kitbdev deleted the fix-update-mouse-cursor-state-pos branch July 31, 2024 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants