diff --git a/CHANGELOG.md b/CHANGELOG.md index 65fe527f07..253be4c9fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +- Fixed `CGLContextObj` having an invalid encoding on newer macOS versions. + # Version 0.31.0 - Bump MSRV from `1.60` to `1.65`. diff --git a/glutin/Cargo.toml b/glutin/Cargo.toml index 53d3b12833..1b4ceb4d83 100644 --- a/glutin/Cargo.toml +++ b/glutin/Cargo.toml @@ -52,7 +52,8 @@ x11-dl = { version = "2.20.0", optional = true } [target.'cfg(any(target_os = "macos"))'.dependencies] cgl = "0.3.2" core-foundation = "0.9.3" -objc2 = "0.4.1" +# Enable `relax-void-encoding` until https://github.com/madsmtm/objc2/pull/526 is resolved +objc2 = { version = "0.4.1", features = ["relax-void-encoding"] } dispatch = "0.2.0" [target.'cfg(any(target_os = "macos"))'.dependencies.icrate] diff --git a/glutin/src/api/cgl/appkit.rs b/glutin/src/api/cgl/appkit.rs index ef85cae31c..325f28c99d 100644 --- a/glutin/src/api/cgl/appkit.rs +++ b/glutin/src/api/cgl/appkit.rs @@ -17,7 +17,7 @@ pub struct CGLContextObj { } unsafe impl RefEncode for CGLContextObj { - const ENCODING_REF: Encoding = Encoding::Pointer(&Encoding::Struct("_CGLContextObject", &[])); + const ENCODING_REF: Encoding = Encoding::Pointer(&Encoding::Void); } extern_class!(