Merge pull request #24 from vberger/master

Update winit dependency
This commit is contained in:
Victor Berger 2017-06-24 13:58:10 +02:00 committed by GitHub
commit 571d2ed511
2 changed files with 29 additions and 31 deletions

View File

@ -5,17 +5,17 @@ authors = ["Victor Berger <victor.berger@thalesgroup.com>"]
license = "MIT"
[dependencies]
wayland-server = "0.9.4"
wayland-server = "0.9.9"
nix = "0.7.0"
xkbcommon = "0.2.1"
tempfile = "2.1.5"
slog = { version = "2.0.0" }
slog-stdlog = "2.0.0-0.2"
libloading = "0.4.0"
wayland-client = { version = "~0.8.6", optional = true }
winit = { git = "https://github.com/tomaka/winit.git", optional = true }
glium = { version = "~0.16.0", optional = true, default-features = false }
input = { version = "~0.2.0", optional = true }
wayland-client = { version = "0.9.9", optional = true }
winit = { version = "0.7.0", optional = true }
glium = { version = "0.16.0", optional = true, default-features = false }
input = { version = "0.2.0", optional = true }
clippy = { version = "*", optional = true }
rental = "0.4.11"

View File

@ -110,8 +110,9 @@ where
let window = Rc::new(builder.build(&events_loop)?);
debug!(log, "Window created");
let (native_display, native_surface, surface) =
if let (Some(conn), Some(window)) = (get_x11_xconnection(), window.get_xlib_window()) {
let (native_display, native_surface, surface) = if let (Some(conn), Some(window)) =
(get_x11_xconnection(), window.get_xlib_window())
{
debug!(log, "Window is backed by X11");
(
NativeDisplay::X11(conn.display as *const _),
@ -119,14 +120,11 @@ where
None,
)
} else if let (Some(display), Some(surface)) =
(
window.get_wayland_display(),
window.get_wayland_client_surface(),
)
(window.get_wayland_display(), window.get_wayland_surface())
{
debug!(log, "Window is backed by Wayland");
let (w, h) = window.get_inner_size().unwrap();
let egl_surface = wegl::WlEglSurface::new(surface, w as i32, h as i32);
let egl_surface = unsafe { wegl::WlEglSurface::new_from_raw(surface as *mut _, w as i32, h as i32) };
(
NativeDisplay::Wayland(display),
NativeSurface::Wayland(egl_surface.ptr() as *const _),