Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continue execution after closing native eframe window (#1889)
This adds `NativeOptions::run_and_return` with default value `true`. If `true`, execution will continue after the eframe window is closed. This is a new behavior introduced in this PR. If `false`, the app will close once the eframe window is closed. The is the old behavior. This is `true` by default, and the `false` option is only there so we can revert if we find any bugs. When `true`, [`winit::platform::run_return::EventLoopExtRunReturn::run_return`](https://docs.rs/winit/latest/winit/platform/run_return/trait.EventLoopExtRunReturn.html#tymethod.run_return) is used. The winit docs warns of its usage, recommending `EventLoop::run`, but 🤷 When `false`, [`winit::event_loop::EventLoop::run`](https://docs.rs/winit/latest/winit/event_loop/struct.EventLoop.html#method.run) is used. This is a really useful feature. You can now use `eframe` to quickly open up a window and show some data or options, and then continue your program after the `eframe` window is closed My previous attempt at this caused some problems, but my new attempt seems to be working much better, at least on my Mac.
- Loading branch information