aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2014-11-24 20:13:32 +0100
committerPierre Krieger <pierre.krieger1708@gmail.com>2014-11-24 20:13:52 +0100
commit4c0413bc7cbf83066014ca2334827fd8ccfbcfa7 (patch)
tree49cbbce62bec8a6203ab731df87001b32cd7c81d /src/x11
parent9668878f266dc23f8be353d804f7c99fb96767ac (diff)
downloadglutin-4c0413bc7cbf83066014ca2334827fd8ccfbcfa7.tar.gz
glutin-4c0413bc7cbf83066014ca2334827fd8ccfbcfa7.zip
Implement lists sharing
Diffstat (limited to 'src/x11')
-rw-r--r--src/x11/window/mod.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs
index dff33bf..668cd03 100644
--- a/src/x11/window/mod.rs
+++ b/src/x11/window/mod.rs
@@ -248,11 +248,17 @@ impl Window {
})
});
+ let share = if let Some(win) = builder.sharing {
+ win.window.context
+ } else {
+ ptr::null()
+ };
+
let context = if extra_functions.CreateContextAttribsARB.is_loaded() {
extra_functions.CreateContextAttribsARB(display as *mut ffi::glx_extra::types::Display,
- fb_config, ptr::null(), 1, attributes.as_ptr())
+ fb_config, share, 1, attributes.as_ptr())
} else {
- ffi::glx::CreateContext(display, &mut visual_infos, ptr::null(), 1)
+ ffi::glx::CreateContext(display, &mut visual_infos, share, 1)
};
if context.is_null() {