summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnders Rasmussen <divinegod@gmail.com>2017-02-23 13:34:52 +1100
committerJoe Wilm <jwilm@users.noreply.github.com>2017-02-22 21:07:38 -0800
commitfef965c121d30463adb1c88e91644b24751461da (patch)
tree3d75b8a5cb57bbbb079c3a6ca6a60f5e9fc56074 /src
parentf1ea49b75d81955faebd2e922975bcc58e8634ef (diff)
hide mouse cursor mac os
Diffstat (limited to 'src')
-rw-r--r--src/window.rs6
1 files changed, 3 insertions, 3 deletions
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<Option<Box<Fn(u32, u32) + 'static + Send>>> = Mutex::new(None);
+ static ref RESIZE_CALLBACK: Mutex<Option<Box<Fn(u32, u32) + 'static + Send>>> = 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();
}
}
}