aboutsummaryrefslogtreecommitdiffstats
path: root/src/cocoa
diff options
context:
space:
mode:
authorRyan Stewart <ryan@binsoftware.com>2015-03-18 14:16:35 -0700
committerRyan Stewart <ryan@binsoftware.com>2015-03-18 14:16:35 -0700
commit1b2fd6e6d01788922a90cd4e58adf371007f50a8 (patch)
tree5266e1e7a4c1141faeb71a51e01047daa32e712a /src/cocoa
parent779f3ce888e0009bdbd14bc28a1e475b46df83ee (diff)
downloadglutin-1b2fd6e6d01788922a90cd4e58adf371007f50a8.tar.gz
glutin-1b2fd6e6d01788922a90cd4e58adf371007f50a8.zip
fix headless build by ensuring NativeMonitorId enum is available internally even without the window feature; add Eq/PartialEq to NativeMonitorId
Diffstat (limited to 'src/cocoa')
-rw-r--r--src/cocoa/mod.rs4
-rw-r--r--src/cocoa/monitor.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cocoa/mod.rs b/src/cocoa/mod.rs
index 22ec4b4..f4b2726 100644
--- a/src/cocoa/mod.rs
+++ b/src/cocoa/mod.rs
@@ -8,7 +8,7 @@ use libc;
use Api;
use BuilderAttribs;
use GlRequest;
-use NativeMonitorID;
+use native_monitor::NativeMonitorId;
use cocoa::base::{Class, id, YES, NO, NSUInteger, nil, objc_allocateClassPair, class, objc_registerClassPair};
use cocoa::base::{selector, msg_send, msg_send_stret, class_addMethod, class_addIvar};
@@ -409,7 +409,7 @@ impl Window {
unsafe {
let screen = monitor.map(|monitor_id| {
let native_id = match monitor_id.get_native_identifier() {
- NativeMonitorID::Numeric(num) => num,
+ NativeMonitorId::Numeric(num) => num,
_ => panic!("OS X monitors should always have a numeric native ID")
};
let matching_screen = {
diff --git a/src/cocoa/monitor.rs b/src/cocoa/monitor.rs
index 1902f6a..bf15665 100644
--- a/src/cocoa/monitor.rs
+++ b/src/cocoa/monitor.rs
@@ -1,6 +1,6 @@
use core_graphics::display;
use std::collections::VecDeque;
-use window::NativeMonitorID;
+use native_monitor::NativeMonitorId;
pub struct MonitorID(u32);
@@ -36,9 +36,9 @@ impl MonitorID {
Some(format!("Monitor #{}", screen_num))
}
- pub fn get_native_identifier(&self) -> NativeMonitorID {
+ pub fn get_native_identifier(&self) -> NativeMonitorId {
let MonitorID(display_id) = *self;
- NativeMonitorID::Numeric(display_id)
+ NativeMonitorId::Numeric(display_id)
}
pub fn get_dimensions(&self) -> (u32, u32) {