Skip to content

Commit

Permalink
Revert "The cocoa crate links to AppKit, which made the symbol `CGD…
Browse files Browse the repository at this point in the history
…isplayCreateUUIDFromDisplayID` from ApplicationServices/ColorSync (which AppKit uses internally) available to us on macOS 10.8 to 10.13. (#275)" (#279)

This reverts commit 6f9c468.
  • Loading branch information
Ngo Iok Ui (Wu Yu Wei) authored Jan 13, 2022
1 parent f5864e4 commit 59db0da
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
6 changes: 0 additions & 6 deletions .changes/mac-link.md

This file was deleted.

11 changes: 1 addition & 10 deletions src/platform_impl/macos/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,18 +168,9 @@ pub const IO8BitOverlayPixels: &str = "O8";
pub type CGWindowLevel = i32;
pub type CGDisplayModeRef = *mut libc::c_void;

// `CGDisplayCreateUUIDFromDisplayID` comes from the `ColorSync` framework.
// However, that framework was only introduced "publicly" in macOS 10.13.
//
// Since we want to support older versions, we can't link to `ColorSync`
// directly. Fortunately, it has always been available as a subframework of
// `ApplicationServices`, see:
// https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/SystemFrameworks/SystemFrameworks.html#//apple_ref/doc/uid/TP40001067-CH210-BBCFFIEG
//
// TODO: Remove the WINIT_LINK_COLORSYNC hack, it is probably not needed.
#[cfg_attr(
not(use_colorsync_cgdisplaycreateuuidfromdisplayid),
link(name = "ApplicationServices", kind = "framework")
link(name = "CoreGraphics", kind = "framework")
)]
#[cfg_attr(
use_colorsync_cgdisplaycreateuuidfromdisplayid,
Expand Down

0 comments on commit 59db0da

Please sign in to comment.