-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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 mouse entered notifications #88992
Fix mouse entered notifications #88992
Conversation
Make sure, that a windows initial state is `mouse_in_viewport = false`. This makes sure, that the mouse entered notification is sent when the mouse hovers a window for the first time. For embedded Windows, `NOTIFICATION_WM_MOUSE_ENTER` is currently sent twice in a row. Remove one of the places where it is sent. `Window::_update_mouse_over()` is the correct one, because there it is also called for native windows.
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.
The rationale makes sense to me.
Thanks! |
This commit broke my game, but I'm not sure if I'm doing the wrong thing or not hence me asking here rather than creating an issue. In my game, there is a computer screen that you can interact with in a 3D world. The computer screen displays a viewport's texture, and events are proxied to it via Previously: my viewport was receiving Now: I found a workaround - I can call |
@eviltrout thanks for the report. I will look into it. |
Sure thing, here is the bug report: #89757 |
Make sure, that a windows initial state is
mouse_in_viewport = false
. This makes sure, that the mouse entered notification is sent when the mouse hovers a window for the first time. (resolve #88942)For embedded Windows,
NOTIFICATION_WM_MOUSE_ENTER
is currently sent twice in a row. Remove one of the places where it is sent.Window::_update_mouse_over()
is the correct one, because there it is also called for native windows. (bug detected while investigating #88942)