aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2015-03-24 18:33:53 +1100
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2015-03-24 18:33:53 +1100
commit8a463f664302d90fbe31800ec25afadb1cf6d7c3 (patch)
treecc5b4782cf5204d57c60024fb6a9bb33bea65398 /src/x11
parent8ad9d5fb4dfc373e69e5530961302b1990d898bf (diff)
parentcf630ec0416d89bde9fcc6d8bd3674a7c55ac1a5 (diff)
downloadglutin-8a463f664302d90fbe31800ec25afadb1cf6d7c3.tar.gz
glutin-8a463f664302d90fbe31800ec25afadb1cf6d7c3.zip
Merge pull request #316 from binsoftware/cocoa-fixes
Cocoa fixes: memory leaks, monitor handling, is_current()
Diffstat (limited to 'src/x11')
-rw-r--r--src/x11/window/monitor.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/x11/window/monitor.rs b/src/x11/window/monitor.rs
index 1dc0350..46f2062 100644
--- a/src/x11/window/monitor.rs
+++ b/src/x11/window/monitor.rs
@@ -2,6 +2,7 @@ use std::ptr;
use std::collections::VecDeque;
use super::super::ffi;
use super::ensure_thread_init;
+use native_monitor::NativeMonitorId;
pub struct MonitorID(pub u32);
@@ -43,6 +44,11 @@ impl MonitorID {
Some(format!("Monitor #{}", screen_num))
}
+ pub fn get_native_identifier(&self) -> NativeMonitorId {
+ let MonitorID(screen_num) = *self;
+ NativeMonitorId::Numeric(screen_num)
+ }
+
pub fn get_dimensions(&self) -> (u32, u32) {
let dimensions = unsafe {
let display = ffi::XOpenDisplay(ptr::null());