-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Game window loses focus on start, must left-click first to enable inputs #74619
Comments
I'm having almost the identical issue. Reorted it in #74587 You're not alone! |
Duplicate of #74587 |
how fix this? |
Having "Resizeable" unchecked is what causes this. Turning it back on will make it focus on startup. If you want to keep this a thing, have it unchecked by default then run this code in a ready function: |
I had an issue where Windows' taskbar showed on top of the game on exclusive fullscreen mode, even after the player clicks on the window to give it focus. Disabling "Resizeable" fixed that too. |
Godot version
4.0
System information
Windows 10
Issue description
Sometimes when running a scene, the game loses focus, keyboard doesn't work and mouse events get ignored, you must left click to focus on the game window and start playing.
Steps to reproduce
Run the scene several times. Sometimes it will work just fine, others you will try to move with WASD or move the mouse and nothing will happen. Left click if that happens to "solve" the issue.
These are the settings for the Window.
Minimal reproduction project
focus.zip
The text was updated successfully, but these errors were encountered: