Fix window wrapper disabling prematurely on close request - #1322
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 |
7adeba1 to
b11c75e
Compare
|
I can confirm the disappearing decorations stay. |
JoltedJon
left a comment
There was a problem hiding this comment.
From holonet's testing on my behalf (due to hyprland not having decorations) this PR seems solid
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