diff --git a/src/osx/event.rs b/src/osx/event.rs index b5853bca..8b985b5a 100644 --- a/src/osx/event.rs +++ b/src/osx/event.rs @@ -1,6 +1,4 @@ use events; -use cocoa::base::NSUInteger; -use cocoa::appkit; pub fn vkeycode_to_element(code: u16) -> Option { Some(match code { diff --git a/src/osx/mod.rs b/src/osx/mod.rs index d6f1b8b0..80a4226d 100644 --- a/src/osx/mod.rs +++ b/src/osx/mod.rs @@ -113,7 +113,10 @@ impl Window { fn create_window(dimensions: (uint, uint), title: &str, monitor: Option) -> Option { unsafe { let scr_frame = match monitor { - Some(_) => NSScreen::mainScreen(nil).frame(), + Some(_) => { + let screen = NSScreen::mainScreen(nil); + NSScreen::frame(screen) + } None => { let (width, height) = dimensions; NSRect::new(NSPoint::new(0., 0.), NSSize::new(width as f64, height as f64))