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 Embedded Game does not focus when mouse over on Windows #103052

Conversation

Hilderin
Copy link
Contributor

The issue was fixed by adding a SetForegroundWindow before the SetFocus. My guess is that's another side-effect of the input queue thread being detached between the editor and the embedded game process.

Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

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

Seems to be working.

But I'm not sure if it's always desired, it can result in extremely annoying behavior with menus.

Screen.Recording.2025-02-20.100840.mp4

Probably should at least check it there are opened popups and not take focus. And maybe be configurable.

@Hilderin Hilderin force-pushed the fix-embedded-game-mouse-over-not-focused-windows branch from 58a9ffb to c7bc322 Compare February 20, 2025 21:28
@Hilderin
Copy link
Contributor Author

Good point!! We already checked for modal windows in EmbeddedProcess::_check_mouse_over, I updated the validation to check for any popups.

@akien-mga akien-mga merged commit 05c56e8 into godotengine:master Feb 23, 2025
20 checks passed
@akien-mga
Copy link
Member

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.

Embedded Game does not focus when mouse over on Windows
3 participants