Comments (3)
It would be pretty counter intuitive to me that a secondary window would be "promoted" the primary window when the first closes. We also already allow the user to configure the exit condition. Maybe I'm missing some context, but this doesn't seem like the kind of thing there is a sensible default for in multi-window scenarios. I think I am probably working with multi-window apps more than the average user, and personally I always disable primary window function on the default plugin.
from bevy.
I agree that promoting an arbitrary window to become the PrimaryWindow
doesn't seem like the right response here. In some apps it makes sense (e.g., a web browser where other windows are basically just the primary window again) but in others I could see it being very confusing (e.g., the CAD application I use spawns a second window just for a couple of tools, promoting that to the primary window seems odd).
Perhaps a window could be annotated with a SecondaryWindow
component indicating that it is appropriate to promote that window into a PrimaryWindow
when the primary is destroyed? If no secondary windows are available to promote, then I would expect the application to gracefully quit by default. However, that last step should be configurable for more niche use cases.
from bevy.
IMO, we should handle this as gracefully as possible, as long as we expose an on-by-default way to prevent the primary window from being closed without killing the app. That means promoting another window to take its place.
When windows are despawned, we should despawn any cameras targeting them. Down the line, this should be enforced through the use of relations with the "despawn when the paired entity is missing" behavior.
from bevy.
Related Issues (20)
- `build-wasm-atomics` job is failing HOT 1
- Meshlet simplification might be a bottleneck in bevy's Nanite solution HOT 16
- `build-wasm-atomics` CI check failing HOT 3
- Improve CompressedImageSaver HOT 8
- `msaa_writeback` is inefficient
- Add a SystemParam that gives a resource and the previous value of that resource HOT 1
- Poor performance with Query::iter_combinations_mut compared to a similar algorithm in a Nannou project HOT 7
- Improve update_mesh_previous_global_transforms() performance HOT 3
- Time-keeping broken with `UpdateMode::Reactive` (X11 and WASM) HOT 2
- Document all_tuples_with_size, and its difference to all_tuples
- wrong colour on certain gpus HOT 2
- Custom Asset IO example not loading assets on website HOT 3
- Watching entity after spawning an observer can contribute to unnecessary bugs
- Gizmos broke on WASM HOT 13
- Consider using `fake_variadic` to improve docs HOT 5
- Hot asset reloading example does not update when saving torus.gltf HOT 5
- Collecting into a vec leads to better performance for `iter_combinations_mut` HOT 1
- Gizmos circle_2d does not appear for the first few times it is requested after bevy startup HOT 1
- links in bevy/crates/bevy_ecs/README.md does not exist. HOT 1
- Track callsites of where observers are initially triggered. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bevy.