Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax encoding requirements for CGLContextObj #1641

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
3 changes: 2 additions & 1 deletion glutin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion glutin/src/api/cgl/appkit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down
Loading