diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2014-12-30 08:31:09 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2014-12-30 08:31:09 +0100 |
commit | 32faad403b19f974733ddf531d61dc8d842af288 (patch) | |
tree | 0b23538cd302d3bd42c6784a74b0c8df882a74dc /src/win32/mod.rs | |
parent | 29bf3385add5ee9306452fe605984838ecfaa1a5 (diff) | |
parent | b9a6366f96e14e396452da443b64a10ee480fabf (diff) | |
download | glutin-32faad403b19f974733ddf531d61dc8d842af288.tar.gz glutin-32faad403b19f974733ddf531d61dc8d842af288.zip |
Merge pull request #178 from tomaka/update-rustc
Update for changes in Send/Sync traits
Diffstat (limited to 'src/win32/mod.rs')
-rw-r--r-- | src/win32/mod.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/win32/mod.rs b/src/win32/mod.rs index dba08e5..a5f0547 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -51,6 +51,11 @@ impl HeadlessContext { } } +#[cfg(feature = "headless")] +unsafe impl Send for HeadlessContext {} +#[cfg(feature = "headless")] +unsafe impl Sync for HeadlessContext {} + /// The Win32 implementation of the main `Window` object. pub struct Window { /// Main handle for the window. @@ -75,6 +80,9 @@ pub struct Window { is_closed: AtomicBool, } +unsafe impl Send for Window {} +unsafe impl Sync for Window {} + #[cfg(feature = "window")] impl Window { /// See the docs in the crate root file. @@ -82,7 +90,8 @@ impl Window { let WindowBuilder { dimensions, title, monitor, gl_version, gl_debug, vsync, visible, sharing, multisampling } = builder; init::new_window(dimensions, title, monitor, gl_version, gl_debug, vsync, - !visible, sharing.map(|w| w.window.context), multisampling) + !visible, sharing.map(|w| init::ContextHack(w.window.context)), + multisampling) } } |