aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11')
-rw-r--r--src/x11/window/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs
index 0c501ff..05fcf14 100644
--- a/src/x11/window/mod.rs
+++ b/src/x11/window/mod.rs
@@ -59,7 +59,8 @@ unsafe impl Sync for Window {}
impl Drop for XWindow {
fn drop(&mut self) {
unsafe {
- ffi::glx::MakeCurrent(self.display, 0, ptr::null());
+ // we don't call MakeCurrent(0, 0) because we are not sure that the context
+ // is still the current one
ffi::glx::DestroyContext(self.display, self.context);
if self.is_fullscreen {