mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-12 05:31:31 +11:00
Fix so the compiler can infer msg_send! return types (#1227)
* Fix so the compiler can infer msg_send! return type Currently, due to a quirk in Rust's type inference interacting with the structure of the msg_send! macro, a () return type will be inferred when the compiler cannot otherwise determine the return type. This behavior is expected to change, and in the future could resolve to a ! return type, which results in undefined behavior. Linting has previously been added for this in rust-lang/rust#39216, but it did not catch these cases due to SSheldon/rust-objc#62. An upcoming version of objc will be fixed to stop hiding these errors, at which point they will become compile errors. This change fixes these errors and allows winit to compile with the fixed version of objc. * Bump cocoa to 0.19.1
This commit is contained in:
parent
2b5f9c52a6
commit
af3ef52252
|
@ -37,7 +37,7 @@ version = "0.2"
|
||||||
objc = "0.2.3"
|
objc = "0.2.3"
|
||||||
|
|
||||||
[target.'cfg(target_os = "macos")'.dependencies]
|
[target.'cfg(target_os = "macos")'.dependencies]
|
||||||
cocoa = "0.18.4"
|
cocoa = "0.19.1"
|
||||||
core-foundation = "0.6"
|
core-foundation = "0.6"
|
||||||
core-graphics = "0.17.3"
|
core-graphics = "0.17.3"
|
||||||
dispatch = "0.1.4"
|
dispatch = "0.1.4"
|
||||||
|
|
|
@ -786,7 +786,7 @@ impl UnownedWindow {
|
||||||
// of the menu bar, and this looks broken, so we must make sure
|
// of the menu bar, and this looks broken, so we must make sure
|
||||||
// that the menu bar is disabled. This is done in the window
|
// that the menu bar is disabled. This is done in the window
|
||||||
// delegate in `window:willUseFullScreenPresentationOptions:`.
|
// delegate in `window:willUseFullScreenPresentationOptions:`.
|
||||||
msg_send![*self.ns_window, setLevel: ffi::CGShieldingWindowLevel() + 1];
|
let () = msg_send![*self.ns_window, setLevel: ffi::CGShieldingWindowLevel() + 1];
|
||||||
},
|
},
|
||||||
(
|
(
|
||||||
&Some(Fullscreen::Exclusive(RootVideoMode { ref video_mode })),
|
&Some(Fullscreen::Exclusive(RootVideoMode { ref video_mode })),
|
||||||
|
|
Loading…
Reference in a new issue