aboutsummaryrefslogtreecommitdiff
path: root/src/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/window.rs b/src/window.rs
index 00f60c38..d0a51e6b 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -303,6 +303,21 @@ impl Window {
else { glutin::CursorState::Hide }).unwrap();
}
}
+
+ #[cfg(not(target_os = "macos"))]
+ pub fn get_window_id(&self) -> Option<usize> {
+ use glutin::os::unix::WindowExt;
+
+ match self.glutin_window.get_xlib_window() {
+ Some(xlib_window) => Some(xlib_window as usize),
+ None => None
+ }
+ }
+
+ #[cfg(target_os = "macos")]
+ pub fn get_window_id(&self) -> Option<usize> {
+ None
+ }
}
pub trait OsExtensions {