aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/window
diff options
context:
space:
mode:
authorRyan Stewart <ryan@binsoftware.com>2015-03-16 13:52:58 -0700
committerRyan Stewart <ryan@binsoftware.com>2015-03-16 14:11:49 -0700
commit9914d826b8c79f81c5ae4418b827da51d2bf4a4f (patch)
tree910d7b5c071ad7e3c044659ad792f26612b047e3 /src/x11/window
parent0fa5e541e8e11eb0ee47f9679e3a1e755e7c975a (diff)
downloadglutin-9914d826b8c79f81c5ae4418b827da51d2bf4a4f.tar.gz
glutin-9914d826b8c79f81c5ae4418b827da51d2bf4a4f.zip
expose platform-native monitor identifier
Diffstat (limited to 'src/x11/window')
-rw-r--r--src/x11/window/monitor.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/x11/window/monitor.rs b/src/x11/window/monitor.rs
index 77ac4ec..a99f2f2 100644
--- a/src/x11/window/monitor.rs
+++ b/src/x11/window/monitor.rs
@@ -43,6 +43,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());