-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Fix invisible window creation on Windows #18105
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 invisible window creation on Windows #18105
Conversation
… application startup. Fixes bevyengine#18027
…ning in about_to_wait. Fixes monitor_info example.
|
I tested the However, I was a bit uncertain if the window was really hidden long enough, so I tried increasing the threshold in After adding some debug prints, my guess is that it breaks if the app waits for more frames than the default Testing the PR unchanged: Aftering increasing If I then increase
|
|
I've added another check to explicitly look for when all windows are invisible. There is some other logic that is driving the update loop based on the visibility status and it has a bunch |
greeble-dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest version fixes the issues I had. Tested with various delays in window_settings.
…indows The fix in bevyengine#18105 includes a check for running headless, but this allows for an extra world update during shutdown. This commit checks if the AppExit event has been recorded and prevents the additional world update.
…indows The fix in bevyengine#18105 includes a check for running headless, but this allows for an extra world update during shutdown. This commit checks if the AppExit event has been recorded and prevents the additional world update.
…indows (#18175) # Objective The fix in #18105 includes a check for running headless, but this allows for an extra world update during shutdown. This commit checks if the `AppExit` event has been recorded and prevents the additional world update. ### Before ``` 2025-03-06T03:11:59.999679Z INFO bevy_window::system: No windows are open, exiting 2025-03-06T03:12:00.001942Z INFO bevy_winit::system: Closing window 0v1 2025-03-06T03:12:00.012691Z INFO bevy_window::system: No windows are open, exiting ``` ### After ``` 2025-03-06T03:18:45.552243Z INFO bevy_window::system: No windows are open, exiting 2025-03-06T03:18:45.554119Z INFO bevy_winit::system: Closing window 0v1 ``` ## Testing Ran `window` examples - `monitor_info` continues to run after all windows are closed (it has `ExitCondition::DontExit`) - `window_settings` invisible window creation works as expected - `multiple_windows` exits after both windows are closed with a single exit message
Objective
Fixes #18027
Solution
Run
redraw_requestedlogic inabout_to_waiton Windows during initial application startup and when in headless modeTesting
cargo run --example window_settingsto demonstrate invisible window creation worked again and fixes Application started with a hidden window never actually runs #18027cargo run --example eased_motionto demonstrate no regression with the fix for WakeUp doesn't unfreeze systems when dragging #17488Ran all additional
windowexamples.Notes:
transparent_windowwas not transparent but this appears to have been broken prior to Fix window freezing when dragged or resized on Windows #18004. See: Window transparency broken on Windows #7544