aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/headless.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11/headless.rs')
-rw-r--r--src/x11/headless.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/x11/headless.rs b/src/x11/headless.rs
index ca47414..e23dfa7 100644
--- a/src/x11/headless.rs
+++ b/src/x11/headless.rs
@@ -47,6 +47,10 @@ impl HeadlessContext {
}
}
+ pub fn is_current(&self) -> bool {
+ unsafe { ffi::OSMesaGetCurrentContext() == self.context }
+ }
+
pub fn get_proc_address(&self, addr: &str) -> *const () {
unsafe {
with_c_str(addr, |s| {