-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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 scene reload crash related to mouse cursor update #69318
Fix scene reload crash related to mouse cursor update #69318
Conversation
0e2ecac
to
f020198
Compare
This was discussed in a PR-review-meeting. |
After a scene reload a mouse cursor updates is performed via a InputEventMouseMotion, that is exposed to the user. The state of Input is however not adjusted to this InputEventMouseMotion which can lead to inconsistencies. This PR makes sure, that it is not exposed to the user. It utilizes the method of Viewport::_process_picking for marking events that are not sent to the user, so that this function doesn't need to be changed.
f020198
to
5bb66d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine.
I checked whether there are some internal events that could be relevant for the user and there are some Viewport events for unpressing mouse buttons. Probably not important tho 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Input is always tricky, with many corner cases and side effects. That said, this makes sense as far as I can tell without investigating everything myself.
Thanks! |
After a scene reload, a mouse cursor update is performed via a
InputEventMouseMotion
, that is exposed to the user. The state ofInput
is however not adjusted to thisInputEventMouseMotion
which can lead to inconsistencies:Input
resolve #69227
Bugsquad edit: Fixes #71500
introduced in #58995
This PR makes sure, that the event is not exposed to the user. It makes sense, that events for internal concerns should not be exposed to the user.
It utilizes the same method that was already used in
Viewport::_process_picking
for marking events that are not sent to the user, so that this function doesn't need to be changed.Updated 2023-02-10: Fix merge conflict