Fix Floating Window request close when a dialog is opened #102470
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the issue where the game window does not close when it receives a close request. Normally, when a dialog is open, Godot does not close when the user clicks the X button. However, when using the Floating Window, this behavior was not handled correctly. I expected Godot to always close when it received a close request. To address this, I disconnected the embedded process from the editor, allowing the Floating Window to move without repositioning the embedded process.
I added a new
DisplayServer::request_close_embedded_process
method that only sends the close request to the embedded process. This new method is now used when the user attempts to close the Floating Window. As a result, when a dialog is open, the Floating Window will not close, which is the expected behavior when it's not embedded.godot.windows.editor.dev.x86_64_3Yvv0V5B10.mp4