Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: normalize native Quit results on Intel macOS

Richie McIlroy546115395bc1
diff --git a/apps/desktop-gpui/src/platform.rs b/apps/desktop-gpui/src/platform.rs
index 0b4a0c6e3..fd8510b77 100644
--- a/apps/desktop-gpui/src/platform.rs
+++ b/apps/desktop-gpui/src/platform.rs
@@ -168,12 +168,14 @@ mod mac {
unsafe extern "C-unwind" fn(&AnyObject, Sel, *mut AnyObject) -> usize,
Imp,
>(application_should_terminate);
- if !ffi::class_addMethod(
+ if !objc2::runtime::Bool::from_raw(ffi::class_addMethod(
delegate_class as *const _ as *mut _,
selector.as_ptr(),
Some(implementation),
c"Q@:@".as_ptr(),
- ) {
+ ))
+ .as_bool()
+ {
return Err("Could not install the native Quit handler".into());
}
Ok(receiver)