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 focus loss on macOS. #43678

Merged
merged 1 commit into from
Nov 19, 2020
Merged

Fix focus loss on macOS. #43678

merged 1 commit into from
Nov 19, 2020

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Nov 19, 2020

Fixes #43675.

Regression form #42276, removed line works when app is started from terminal, but cause app to minimize on start if bundled. Removing it means that app with --no-window will steal focus form terminal / parent process, but with the current way Godot is handling command line arguments unlikely there's a way to do it better.

Probably we need to split argument parsing to have stuff like no-window before OS init.

  1. Parse arguments for OS init.
  2. Init OS.
  3. Parse arguments for opening files/projects (in case of macOS, argument list can be changed by OS init, macOS is handling file associations in openFile: app delegate callback instead of command line).
  4. Init DisplayServer, Audio, etc. and load project.

Copy link
Member

@RandomShaper RandomShaper left a comment

Choose a reason for hiding this comment

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

Looks good to me.

The focus stealing issue can be addressed separately if it turns out to be too annoying for users.

@akien-mga akien-mga merged commit 93936ad into godotengine:3.2 Nov 19, 2020
@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.

3 participants