summaryrefslogtreecommitdiffstats
path: root/winit/src/application.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-08-26 19:48:40 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-08-26 19:48:40 +0200
commitc08c78ad17268ff99b3fc10efef76c6df399e547 (patch)
treec28d93d72af10c54151b2e20ca3279d09db87c3b /winit/src/application.rs
parentda7e8598406fcde2a33ea749d561a2f10dbb5407 (diff)
downloadiced-c08c78ad17268ff99b3fc10efef76c6df399e547.tar.gz
iced-c08c78ad17268ff99b3fc10efef76c6df399e547.tar.bz2
iced-c08c78ad17268ff99b3fc10efef76c6df399e547.zip
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.
Diffstat (limited to 'winit/src/application.rs')
-rw-r--r--winit/src/application.rs23
1 files changed, 5 insertions, 18 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs
index ecec6043..a576126e 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -137,15 +137,11 @@ where
runtime.enter(|| A::new(flags))
};
- let should_be_visible = settings.window.visible;
- 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);
@@ -182,7 +178,6 @@ where
receiver,
init_command,
window,
- should_be_visible,
settings.exit_on_close_request,
));
@@ -233,7 +228,6 @@ async fn run_instance<A, E, C>(
mut receiver: mpsc::UnboundedReceiver<winit::event::Event<'_, A::Message>>,
init_command: Command<A::Message>,
window: winit::window::Window,
- should_be_visible: bool,
exit_on_close_request: bool,
) where
A: Application + 'static,
@@ -247,7 +241,6 @@ async fn run_instance<A, E, C>(
let mut clipboard = Clipboard::connect(&window);
let mut cache = user_interface::Cache::default();
let mut surface = compositor.create_surface(&window);
- let mut visible = false;
let mut state = State::new(&application, &window);
let mut viewport_version = state.viewport_version();
@@ -447,12 +440,6 @@ async fn run_instance<A, E, C>(
Ok(()) => {
debug.render_finished();
- if !visible && should_be_visible {
- window.set_visible(true);
-
- visible = true;
- }
-
// TODO: Handle animations!
// Maybe we can use `ControlFlow::WaitUntil` for this.
}