aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/window
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11/window')
-rw-r--r--src/x11/window/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs
index 8664b4a..404324a 100644
--- a/src/x11/window/mod.rs
+++ b/src/x11/window/mod.rs
@@ -701,6 +701,10 @@ impl Window {
}
}
+ pub fn is_current(&self) -> bool {
+ unsafe { ffi::glx::GetCurrentContext() == self.x.context }
+ }
+
pub fn get_proc_address(&self, addr: &str) -> *const () {
use std::mem;