diff options
author | Robert Günzler <r@gnzler.io> | 2017-12-17 08:23:49 +0100 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-12-22 13:14:47 -0800 |
commit | 16c0e24d8e4df2a7ac2826f6ebf00d1ced1f531b (patch) | |
tree | dd4acf4432709d3cb2a13a713cc169c21a9014b2 /src/window.rs | |
parent | 6a1bed0a71ff6a963d9b4535a1ac01727d3ae435 (diff) | |
download | alacritty-16c0e24d8e4df2a7ac2826f6ebf00d1ced1f531b.tar.gz alacritty-16c0e24d8e4df2a7ac2826f6ebf00d1ced1f531b.zip |
Add 'borderless' option
Until winit gives us more capabilities in regard to window decorations
this implements a simple switch that renders the window without any
title bar or border
Diffstat (limited to 'src/window.rs')
-rw-r--r-- | src/window.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/window.rs b/src/window.rs index 486bd590..5dfcdcd6 100644 --- a/src/window.rs +++ b/src/window.rs @@ -183,14 +183,16 @@ impl Window { /// /// This creates a window and fully initializes a window. pub fn new( - title: &str + title: &str, + borderless: bool ) -> Result<Window> { let event_loop = EventsLoop::new(); Window::platform_window_init(); let window = WindowBuilder::new() .with_title(title) - .with_transparency(true); + .with_transparency(true) + .with_decorations(!borderless); let context = ContextBuilder::new() .with_vsync(true); let window = ::glutin::GlWindow::new(window, context, &event_loop)?; |