From 5025db2d592d7d675eb1439d1035ac1cb3818a20 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 28 Jan 2017 15:58:14 +0100 Subject: [PATCH] Unix fix attempt --- src/api_transition.rs | 2 +- src/os/unix.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/api_transition.rs b/src/api_transition.rs index 4841ada6..2d0af294 100644 --- a/src/api_transition.rs +++ b/src/api_transition.rs @@ -55,7 +55,7 @@ macro_rules! gen_api_transition { } pub struct Window2 { - window: ::std::sync::Arc, + pub window: ::std::sync::Arc, events_loop: ::std::sync::Weak, } diff --git a/src/os/unix.rs b/src/os/unix.rs index 7ed56373..63735515 100644 --- a/src/os/unix.rs +++ b/src/os/unix.rs @@ -86,7 +86,7 @@ pub trait WindowExt { impl WindowExt for Window { #[inline] fn get_xlib_window(&self) -> Option<*mut libc::c_void> { - match self.window { + match *self.window.window { LinuxWindow::X(ref w) => Some(w.get_xlib_window()), _ => None } @@ -94,28 +94,28 @@ impl WindowExt for Window { #[inline] fn get_xlib_display(&self) -> Option<*mut libc::c_void> { - match self.window { + match *self.window.window { LinuxWindow::X(ref w) => Some(w.get_xlib_display()), _ => None } } fn get_xlib_screen_id(&self) -> Option<*mut libc::c_void> { - match self.window { + match *self.window.window { LinuxWindow::X(ref w) => Some(w.get_xlib_screen_id()), _ => None } } fn get_xlib_xconnection(&self) -> Option> { - match self.window { + match *self.window.window { LinuxWindow::X(ref w) => Some(w.get_xlib_xconnection()), _ => None } } fn get_xcb_connection(&self) -> Option<*mut libc::c_void> { - match self.window { + match *self.window.window { LinuxWindow::X(ref w) => Some(w.get_xcb_connection()), _ => None } @@ -136,7 +136,7 @@ impl WindowExt for Window { #[inline] fn get_wayland_client_surface(&self) -> Option<&WlSurface> { - match self.window { + match *self.window.window { LinuxWindow::Wayland(ref w) => Some(w.get_surface()), _ => None } @@ -144,7 +144,7 @@ impl WindowExt for Window { #[inline] fn get_wayland_client_display(&self) -> Option<&WlDisplay> { - match self.window { + match *self.window.window { LinuxWindow::Wayland(ref w) => Some(w.get_display()), _ => None }