mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-11 13:51:01 -05:00
Spawn alacritty window as invisible
This change initially spawns alacritty as in invisible window, this makes it possible for the pty to already access data like `window_id` without having to wait for the window manager to actually open the window. Even though `GlWindow::new` is blocking when `with_visibility(true)` is used, the `window.show` call is not blocking. So calling `GlWindow::new` and `with_visibility(false)`, then immediately calling `window.show` will create a window and make it visible instantly.
This commit is contained in:
parent
8aa8422bcc
commit
2b5de00241
1 changed files with 2 additions and 0 deletions
|
@ -196,11 +196,13 @@ impl Window {
|
|||
Window::platform_window_init();
|
||||
let window = WindowBuilder::new()
|
||||
.with_title(title)
|
||||
.with_visibility(false)
|
||||
.with_transparency(true)
|
||||
.with_decorations(window_config.decorations());
|
||||
let context = ContextBuilder::new()
|
||||
.with_vsync(true);
|
||||
let window = ::glutin::GlWindow::new(window, context, &event_loop)?;
|
||||
window.show();
|
||||
|
||||
// Text cursor
|
||||
window.set_cursor(GlutinMouseCursor::Text);
|
||||
|
|
Loading…
Reference in a new issue