diff options
Diffstat (limited to 'src/x11/window')
-rw-r--r-- | src/x11/window/monitor.rs | 6 |
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()); |