aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles <chuckiels2011@gmail.com>2017-11-19 11:57:01 -0500
committerJoe Wilm <jwilm@users.noreply.github.com>2017-11-19 08:57:01 -0800
commita931d691a21a851ca4653cbab3542c600b72ff36 (patch)
treef4ec923c230152ebdf996ef2ac48023a57100cd4 /src
parenta9753c345e262606acc1fbe11943c566325c44fb (diff)
downloadalacritty-a931d691a21a851ca4653cbab3542c600b72ff36.tar.gz
alacritty-a931d691a21a851ca4653cbab3542c600b72ff36.zip
Wait to display window until initialization is complete (#907)
Diffstat (limited to 'src')
-rw-r--r--src/display.rs3
-rw-r--r--src/window.rs7
2 files changed, 9 insertions, 1 deletions
diff --git a/src/display.rs b/src/display.rs
index 862be468..2d87f9ec 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -197,6 +197,9 @@ impl Display {
api.clear(background_color);
});
+ // Show the window now that it's been initialized
+ window.show();
+
Ok(Display {
window: window,
renderer: renderer,
diff --git a/src/window.rs b/src/window.rs
index 486bd590..20c8956f 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -190,7 +190,8 @@ impl Window {
Window::platform_window_init();
let window = WindowBuilder::new()
.with_title(title)
- .with_transparency(true);
+ .with_transparency(true)
+ .with_visibility(false);
let context = ContextBuilder::new()
.with_vsync(true);
let window = ::glutin::GlWindow::new(window, context, &event_loop)?;
@@ -266,6 +267,10 @@ impl Window {
self.window.resize(width, height);
}
+ pub fn show(&self) {
+ self.window.show();
+ }
+
/// Block waiting for events
#[inline]
pub fn wait_events<F>(&mut self, func: F)