From 77d00a8e5acd6ab2bae7efac1d9f9a22b893a36e Mon Sep 17 00:00:00 2001 From: David Partouche Date: Tue, 11 Nov 2014 23:45:20 +0100 Subject: Fixed an issue with the updated rust-cocoa crate --- src/osx/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/osx/mod.rs') diff --git a/src/osx/mod.rs b/src/osx/mod.rs index d6f1b8b..80a4226 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)) -- cgit v1.2.3