Skip to content

macOS: Additional improvements and fixes for embedded window support #106134

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

Merged
merged 1 commit into from
May 7, 2025

Conversation

stuartcarnie
Copy link
Contributor

This PR includes the following PR feedback and improvements for #105884

  • Disables embedded support in single-window mode, as it won't work properly, given the macOS window server composites the embedded layer over the Godot rendered content.
  • Fixes for mouse capture, particularly when debugging
  • Improves the launch arguments, so --embedded is all that is required, and works like an alias to --display-server embedded.

@stuartcarnie stuartcarnie marked this pull request as ready for review May 6, 2025 20:14
@stuartcarnie stuartcarnie requested review from a team as code owners May 6, 2025 20:14
@akien-mga akien-mga requested a review from Calinou May 6, 2025 20:55
@Calinou Calinou added this to the 4.5 milestone May 6, 2025
@akien-mga akien-mga changed the title MacOS: Additional improvements and fixes for embedded window support macOS: Additional improvements and fixes for embedded window support May 6, 2025
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally, it works as expected. Code looks good to me.

I can confirm the mouse capture issues I mentioned in the original PR are gone. I've also checked that the single window mode makes the warning message appear correctly (and disables the feature).

Note that I still can't close the game by pressing the X button when game embedding in a floating window is enabled though. I can do that when game embedding is disabled.

@Repiteo Repiteo merged commit 02206f4 into godotengine:master May 7, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented May 7, 2025

Thanks!

@stuartcarnie stuartcarnie deleted the macos_embedded_followup branch May 7, 2025 20:44
@stuartcarnie
Copy link
Contributor Author

stuartcarnie commented May 7, 2025

Thanks @Calinou. I'm working on the following items, which weren't included in this:

  • Clicking the X button to close the floating game window has no effect.
  • Closing the editor using Ctrl + C in the terminal won't always stop the running project
  • In Compatibility, using window embedding will break V-Sync (FPS will be uncapped).
  • When using Metal in Truck Town (Forward+/Mobile), the sky takes the background color of the game window

@danielgpinheiro
Copy link

Hi @stuartcarnie,
I compiled Godot from the master branch (with your changes), and the game window looks like this. I’m not sure if this is specific to my personal project or due to some window configuration I set up earlier, resulting in this behavior.

Screen.Recording.2025-05-07.at.18.42.39.mov

@stuartcarnie
Copy link
Contributor Author

Are you running any special settings for your display? Is it a high-DPI display?

I have been unable to reproduce that – though it was an issue in much earlier builds. If you can create an MRP, that would help.

@danielgpinheiro
Copy link

danielgpinheiro commented May 8, 2025

My display is 2560x1080 ultrawide. Would sending you my personal Project.godot help?

@stuartcarnie
Copy link
Contributor Author

My display is 2560x1080 ultrawide. Would sending you my personal Project.godot help?

Yes, your personal project.godot would work.

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.

4 participants