aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/x11/monitor.rs
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-09-21 14:42:05 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-09-23 13:11:47 +0200
commitaa9cb99929ee1893699184ded888b2586455f016 (patch)
treeb16503dbfe2248beeed0f7d82b150e64e6453043 /src/api/x11/monitor.rs
parent3820d307a3f23828790e8a46a9c46849592104d6 (diff)
downloadglutin-aa9cb99929ee1893699184ded888b2586455f016.tar.gz
glutin-aa9cb99929ee1893699184ded888b2586455f016.zip
Add #[inline] attributes
Diffstat (limited to 'src/api/x11/monitor.rs')
-rw-r--r--src/api/x11/monitor.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/api/x11/monitor.rs b/src/api/x11/monitor.rs
index 90b12c2..0a20b63 100644
--- a/src/api/x11/monitor.rs
+++ b/src/api/x11/monitor.rs
@@ -15,6 +15,7 @@ pub fn get_available_monitors(x: &Arc<XConnection>) -> VecDeque<MonitorID> {
monitors
}
+#[inline]
pub fn get_primary_monitor(x: &Arc<XConnection>) -> MonitorID {
let primary_monitor = unsafe { (x.xlib.XDefaultScreen)(x.display) };
MonitorID(x.clone(), primary_monitor as u32)
@@ -26,6 +27,7 @@ impl MonitorID {
Some(format!("Monitor #{}", screen_num))
}
+ #[inline]
pub fn get_native_identifier(&self) -> NativeMonitorId {
NativeMonitorId::Numeric(self.1)
}