From c08c78ad17268ff99b3fc10efef76c6df399e547 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 26 Aug 2022 19:48:40 +0200 Subject: Fix invisible window on Windows ... by reverting the changes that were supposed to hide the window initially and only show it after rendering the first frame. --- glutin/src/application.rs | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'glutin/src/application.rs') 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( mut receiver: mpsc::UnboundedReceiver>, mut context: glutin::ContextWrapper, init_command: Command, - should_be_visible: bool, exit_on_close_request: bool, ) where A: Application + 'static, @@ -206,7 +199,6 @@ async fn run_instance( 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( 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. } -- cgit