From fef965c121d30463adb1c88e91644b24751461da Mon Sep 17 00:00:00 2001 From: Anders Rasmussen Date: Thu, 23 Feb 2017 13:34:52 +1100 Subject: hide mouse cursor mac os --- src/window.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/window.rs') diff --git a/src/window.rs b/src/window.rs index fa751352..a69bd0ea 100644 --- a/src/window.rs +++ b/src/window.rs @@ -32,7 +32,7 @@ fn window_resize_handler(width: u32, height: u32) { lazy_static! { /// The resize callback invoked by `window_resize_handler` - static ref RESIZE_CALLBACK: Mutex>> = Mutex::new(None); + static ref RESIZE_CALLBACK: Mutex>> = Mutex::new(None); } /// Window errors @@ -295,8 +295,8 @@ impl Window { pub fn set_cursor_visible(&mut self, visible: bool) { if visible != self.cursor_visible { self.cursor_visible = visible; - self.glutin_window.set_cursor(if visible { glutin::MouseCursor::Default } - else { glutin::MouseCursor::NoneCursor }); + self.glutin_window.set_cursor_state(if visible { glutin::CursorState::Normal } + else { glutin::CursorState::Hide }).unwrap(); } } } -- cgit v1.2.3-54-g00ecf