Fix window wrapper disabling prematurely on close request#1322
Open
Shakai-Dev wants to merge 1 commit into
Open
Fix window wrapper disabling prematurely on close request#1322Shakai-Dev wants to merge 1 commit into
Shakai-Dev wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Walkthrough
ChangesEmbedded game close handling
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Shakai-Dev
force-pushed
the
1165-auto-accept-quit-debug
branch
from
July 24, 2026 10:24
7adeba1 to
b11c75e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1165
TL;DR
This PR fixes an issue where attempting to close a floating game view window in projects with
auto_accept_quitset tofalsecauses the window frame & decorations to be disabled/hidden while the game process & remote debugger remain running in a "ghost" state.The Problem
In
GameView::_window_close_request(),window_wrapper->set_window_enabled(false)was being called unconditionally at the beginning of the function before delegating the close request to the running game process.When a project has
auto_accept_quit = false, the game engine intentionally ignoresNOTIFICATION_WM_CLOSE_REQUEST& waits for script logic to explicitly callget_tree().quit(). Because GameView had already disabled thewindow_wrapper, the UI container hid its window frame/decorations immediately, leaving the game process running continuously in the background without a visible outer window or title bar.The Fix
Moved
window_wrapper->set_window_enabled(false)&embedded_process->reset_timers()into the branch reserved for forced resets (when the game is paused or embedding is still in progress).Allowed graceful close requests (
embedded_process->request_close()) to leave thewindow_wrapperactive.If
auto_accept_quitistrue, the game process exits naturally, triggering_stop_pressed(), which safely handles disabling the window wrapper.If
auto_accept_quitisfalse, the game process ignores the close request & the window wrapper remains open & interactive as expected.Summary by CodeRabbit