Skip to content
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

Hangling multiple windows #58

Open
d0rianb opened this issue Mar 16, 2022 · 4 comments
Open

Hangling multiple windows #58

d0rianb opened this issue Mar 16, 2022 · 4 comments

Comments

@d0rianb
Copy link

d0rianb commented Mar 16, 2022

Is it possible for speedy2d to handle multiple windows ?
I know that winit can do this but I couldn't find any reference to this in the documentation/source code.
I currently can't send the WindowHandler through threads (in order that each window has its own thread) because the Send trait is not implemented by multiple library structs.

@QuantumBadger
Copy link
Owner

QuantumBadger commented Mar 19, 2022

It should be possible to implement this I think, although everything would be on the main thread. We could add a function to the WindowHandler to create a new window, and register a new WindowHandler for it.

It wouldn't work for the WebGL backend, so we'd need to add a way of querying support (or, maybe we could make it work using a popup?)

@LexNastin
Copy link

Is there any news on this? I would really like to use multi window in a program I’m making (a church presentation program, Quantum)

@QuantumBadger
Copy link
Owner

No news yet, but it's still something I'd like to implement. A workaround in the meantime could be to have multiple copies of the process running, which could communicate via sockets.

@Aworldc
Copy link

Aworldc commented Apr 16, 2023

To a user of the library, it looks like the main problem preventing this is that the program exits on closing a window. My idea on how to fix this is that WindowHandler has to implement a function that runs on window close. This will not only allow multiple windows, but it means we can do things like cleaning up temp files on last window close, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants