diff options
author | 2022-08-26 20:10:14 +0200 | |
---|---|---|
committer | 2022-08-26 20:10:14 +0200 | |
commit | 59bccb4ca1046074598297040cac5d9904a9a36f (patch) | |
tree | 1bf09924c799340abdd1aa8b39c4b5626bd9f1a0 /glutin/src | |
parent | 94687696aaca6a756cf99dc3660d471de4895427 (diff) | |
parent | c08c78ad17268ff99b3fc10efef76c6df399e547 (diff) | |
download | iced-59bccb4ca1046074598297040cac5d9904a9a36f.tar.gz iced-59bccb4ca1046074598297040cac5d9904a9a36f.tar.bz2 iced-59bccb4ca1046074598297040cac5d9904a9a36f.zip |
Merge pull request #1422 from iced-rs/fix/invisible-window
Fix invisible window on Windows
Diffstat (limited to 'glutin/src')
-rw-r--r-- | glutin/src/application.rs | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/glutin/src/application.rs b/glutin/src/application.rs index 054cf839..c6bb3e48 100644 --- a/glutin/src/application.rs +++ b/glutin/src/application.rs @@ -54,17 +54,12 @@ where runtime.enter(|| A::new(flags)) }; - let should_be_visible = settings.window.visible; - let context = { - let builder = settings - .window - .into_builder( - &application.title(), - event_loop.primary_monitor(), - settings.id, - ) - .with_visible(false); + let builder = settings.window.into_builder( + &application.title(), + event_loop.primary_monitor(), + settings.id, + ); log::info!("Window builder: {:#?}", builder); @@ -139,7 +134,6 @@ where receiver, context, init_command, - should_be_visible, settings.exit_on_close_request, )); @@ -192,7 +186,6 @@ async fn run_instance<A, E, C>( mut receiver: mpsc::UnboundedReceiver<glutin::event::Event<'_, A::Message>>, mut context: glutin::ContextWrapper<glutin::PossiblyCurrent, Window>, init_command: Command<A::Message>, - should_be_visible: bool, exit_on_close_request: bool, ) where A: Application + 'static, @@ -206,7 +199,6 @@ async fn run_instance<A, E, C>( let mut clipboard = Clipboard::connect(context.window()); let mut cache = user_interface::Cache::default(); let mut state = application::State::new(&application, context.window()); - let mut visible = false; let mut viewport_version = state.viewport_version(); application::run_command( @@ -406,12 +398,6 @@ async fn run_instance<A, E, C>( debug.render_finished(); - if !visible && should_be_visible { - context.window().set_visible(true); - - visible = true; - } - // TODO: Handle animations! // Maybe we can use `ControlFlow::WaitUntil` for this. } |