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 differences between Windows and linuxbsd Display Server #67903

Merged

Conversation

Sauermann
Copy link
Contributor

@Sauermann Sauermann commented Oct 26, 2022

Make adjustments to DisplayServerWindows to reduce the differences to DisplayServerX11.
Prerequisite for #67791

Fix that Windows receive WINDOW_EVENT_MOUSE_EXIT on startup. (fix #67898)

When moving the mouse cursor from one window to a different one, make sure that the first window receives the WINDOW_EVENT_MOUSE_EXIT event before the second window receives the WINDOW_EVENT_MOUSE_ENTER event.

Send Mouse-Move events also for Windows, that are currently not focused.

For determining the currently hovered window, consider not just the currently focused window, but also other windows.

Send mouse move events to focused window instead of hovered window.

Update 2022-10-28: Code cleanup

@Sauermann Sauermann requested a review from a team as a code owner October 26, 2022 11:36
@Sauermann Sauermann force-pushed the fix-startup-windows-mouse-exit-event branch from 06de9d9 to 5a2eda7 Compare October 27, 2022 20:10
@Sauermann Sauermann changed the title Fix that Windows receive WINDOW_EVENT_MOUSE_EXIT on startup Fix differences between Windows and linuxbsd Display Server Oct 27, 2022
@clayjohn clayjohn requested a review from bruvzg October 27, 2022 20:16
@Sauermann Sauermann force-pushed the fix-startup-windows-mouse-exit-event branch 2 times, most recently from f14b4ed to 7223fca Compare October 28, 2022 07:27
Fix that Windows receive WINDOW_EVENT_MOUSE_EXIT on startup.

When moving the mouse cursor from one window to a different one, make sure that the first window receives the WINDOW_EVENT_MOUSE_EXIT event before the second window receives the WINDOW_EVENT_MOUSE_ENTER event.

Send Mouse-Move events also for Windows, that are currently not focused.

For determining the currently hovered window, consider not just the currently focused window, but also other windows.

Send mouse move events to focused window instead of hovered window.
@Sauermann Sauermann force-pushed the fix-startup-windows-mouse-exit-event branch from 7223fca to 4bd601d Compare October 28, 2022 07:32
@clayjohn clayjohn merged commit 282e50a into godotengine:master Oct 28, 2022
@clayjohn
Copy link
Member

Looks good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-embedded Windows receive NOTIFICATION_WM_MOUSE_EXIT notification on startup on Windows platform
5 participants