Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eframe: Only run_return twice on Windows
The approach of emilk#1889 may remove the observer of a view twice, which produces the Obj-C Exception: Cannot remove an observer <...> for the key path "nextResponder" from <WinitView ...> because it is not registered as an observer. The above message can only be seen when attaching the application to debugger. Users normally see: [1] *** trace trap cargo run This commit fixes it by only running event_loop twice on Windows. Besides: * We have set ControlFlow::Exit on 'Event::LoopDestoryed', 'EventResult::Exit' and on error; therefore, it is safe to not calling `set_exit()`. * This commit also fix the persistence function in macOS. It can't store the content in Memory due to this exception. Fixed: emilk#2768 (eframe: "App quit unexpectedly" on macOS) Signed-off-by: pan93412 <[email protected]>
- Loading branch information