Skip to content

Commit 5a0242e

Browse files
ceyusagoddessfreya
authored andcommitted
MacOSX's raw_handle trait method returns CGLContext object (rust-windowing#1221)
1 parent 62df59f commit 5a0242e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

glutin/src/platform_impl/macos/macos.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,13 @@ impl Context {
313313

314314
#[inline]
315315
pub unsafe fn raw_handle(&self) -> *mut raw::c_void {
316-
match *self {
317-
Context::WindowedContext(ref c) => *c.context.deref() as *mut _,
318-
Context::HeadlessContext(ref c) => *c.context.deref() as *mut _,
316+
match self {
317+
Context::WindowedContext(c) => {
318+
c.context.deref().CGLContextObj() as *mut _
319+
}
320+
Context::HeadlessContext(c) => {
321+
c.context.deref().CGLContextObj() as *mut _
322+
}
319323
}
320324
}
321325

0 commit comments

Comments
 (0)