Skip to content

Launching 2 windows one after another never succeeds #948

Answered by derezzedex
rnd-ash asked this question in Q&A
Discussion options

You must be logged in to vote

@rnd-ash It's already documented on Application::run:

On native platforms, this method will take control of the current thread and will NOT return unless there is an Error during startup.

This behavior isn't specified (or needed) by iced itself, it's a consequence (or limitation) of using winit as a shell implementation (by default iced uses winit as the window manager), and looking at their documentation you find that there is an alternative, but it's not recommended and has it's caveats (see run_return).

Personally, I'd make so that when the user tries to close the application, you first write to some config file, and then launch the main application (a different binary) and on the ma…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hecrj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #944 on July 10, 2021 17:37.