diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2014-11-12 08:57:48 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2014-11-12 08:57:48 +0100 |
commit | 6995878cea9b87a3ada6bd0bfbe16c4a950c7a1d (patch) | |
tree | 2a59d464a3814759f42c2ee7beac1f366f78b2c9 | |
parent | 293dcdc9a48bf47c15b91863307d59dd8c31de5b (diff) | |
parent | 77d00a8e5acd6ab2bae7efac1d9f9a22b893a36e (diff) | |
download | glutin-6995878cea9b87a3ada6bd0bfbe16c4a950c7a1d.tar.gz glutin-6995878cea9b87a3ada6bd0bfbe16c4a950c7a1d.zip |
Merge pull request #112 from DavidPartouche/cocoa_fix
Fixed an issue with the updated rust-cocoa crate
-rw-r--r-- | src/osx/event.rs | 2 | ||||
-rw-r--r-- | src/osx/mod.rs | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/osx/event.rs b/src/osx/event.rs index b5853bc..8b985b5 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<events::VirtualKeyCode> { Some(match code { 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<MonitorID>) -> Option<id> { 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)) |