GithubHelp home page GithubHelp logo

Comments (3)

tychedelia avatar tychedelia commented on September 27, 2024 2

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.

bushrat011899 avatar bushrat011899 commented on September 27, 2024 1

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.

alice-i-cecile avatar alice-i-cecile commented on September 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.