1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

egui_glium: run app code outside event loop to fix file dialogs (#631)

Previously app code was run from within the event loop
which lead to file dialogs (e.g. using nfd2) to hang
(see https://github.com/rust-windowing/winit/issues/1779)

Now egui_glium polls for events and then runs the app code.
This commit is contained in:
Emil Ernerfeldt
2021-08-20 18:59:32 +02:00
committed by GitHub
parent 661f0d71a7
commit 04b3921923
4 changed files with 84 additions and 55 deletions

View File

@@ -68,6 +68,6 @@ pub fn start_web(canvas_id: &str, app: Box<dyn epi::App>) -> Result<(), wasm_bin
/// Call from `fn main` like this: `eframe::run_native(Box::new(MyEguiApp::default()))`
#[cfg(not(target_arch = "wasm32"))]
pub fn run_native(app: Box<dyn epi::App>, native_options: epi::NativeOptions) -> ! {
pub fn run_native(app: Box<dyn epi::App>, native_options: epi::NativeOptions) {
egui_glium::run(app, native_options)
}