mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-28 07:33:14 -04:00
This moves the application launch from the beginning of `EventLoop::run_app` to `EventLoop::new`, which: - Feels more consistent, we now emit `new_events(StartCause::Init)` at the beginning of `run_app_on_demand` instead of conditionally depending on if the application has launched or not. - Would allow us to bring back `event_loop.create_window` in some form on macOS, since the application would now be launched between `EventLoop::new` and `EventLoop::run_app`. This differs semantically from iOS where we must still launch the application in `EventLoop::run_app`, but iOS is the special snowflake here, the other desktop platforms' are semantically launched after `EventLoop::new`. Doing it this way also matches what GLFW's init function does.