diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2019-03-14 20:06:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-14 20:06:38 +0000 |
commit | 0f96a62218cfc78b56606f0dcc334d59202edf7c (patch) | |
tree | 2b7e98310d281c11fd9c3c65ae95c78cb55060bb /src | |
parent | b1032bcc6b79135f87f327548e43563da05657fb (diff) | |
download | alacritty-0f96a62218cfc78b56606f0dcc334d59202edf7c.tar.gz alacritty-0f96a62218cfc78b56606f0dcc334d59202edf7c.zip |
Update glutin to version 0.20
Fixes #458.
Fixes #1681.
Diffstat (limited to 'src')
-rw-r--r-- | src/window.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/window.rs b/src/window.rs index 54f0b887..741ca38e 100644 --- a/src/window.rs +++ b/src/window.rs @@ -15,7 +15,6 @@ use std::convert::From; use std::fmt::Display; use crate::gl; -use glutin::GlContext; #[cfg(windows)] use glutin::Icon; #[cfg(windows)] @@ -23,6 +22,7 @@ use image::ImageFormat; use glutin::{ self, ContextBuilder, ControlFlow, Event, EventsLoop, MouseCursor as GlutinMouseCursor, WindowBuilder, + ContextTrait, }; use glutin::dpi::{LogicalPosition, LogicalSize, PhysicalPosition, PhysicalSize}; @@ -54,7 +54,7 @@ type Result<T> = ::std::result::Result<T, Error>; /// Wraps the underlying windowing library to provide a stable API in Alacritty pub struct Window { event_loop: EventsLoop, - window: glutin::GlWindow, + window: glutin::WindowedContext, mouse_visible: bool, /// Whether or not the window is the focused window. @@ -119,12 +119,12 @@ fn create_gl_window( window: WindowBuilder, event_loop: &EventsLoop, srgb: bool, -) -> ::std::result::Result<glutin::GlWindow, glutin::CreationError> { - let context = ContextBuilder::new() +) -> ::std::result::Result<glutin::WindowedContext, glutin::CreationError> { + ContextBuilder::new() .with_srgb(srgb) .with_vsync(true) - .with_hardware_acceleration(None); - ::glutin::GlWindow::new(window, context, event_loop) + .with_hardware_acceleration(None) + .build_windowed(window, event_loop) } impl Window { |