![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump chromium in DEPS to 119.0.6021.0 * 4727729: Initial ScreenCaptureKit AudioInputStream implementation4727729
* chore: fixup patch indices * chore: bump chromium in DEPS to 119.0.6023.0 * 4875713: mac: Switch to Xcode 15.0 15A240d with macOS SDK 14.0 23A3344875713
* 4831380: [task-attribution] Reland: Move to an implicit GCed task container model4831380
* 4877868: Remove all gitignore entries for submodules4877868
* 4824705: Set origin to commit for data: URLs4824705
* chore: fixup patch indices * 4881382: Expose selection in WebFormControlElement as unsigned4881382
* 4874216: Portals: Cancel drag-drop in predecessor before activation4874216
* chore: bump chromium in DEPS to 119.0.6025.0 * chore: bump chromium in DEPS to 119.0.6027.0 * 4884489: Update gitignore to be explicit about directories4884489
* 4881091: Add debug info about owner document's origin when inheriting4881091
* chore: fixup patch indices * chore: bump chromium in DEPS to 119.0.6029.0 * chore: update patches * 4881091: Add debug info about owner document's origin when inheriting Ref:4881091
* 4831380: [task-attribution] Reland: Move to an implicit GCed task container model Ref:4831380
* 4866732: Extract document.title for installable checks Ref:4866732
* chore: link to crbug in message port test --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jeremy Apthorp <nornagon@nornagon.net>
|
|
Date: Thu, 20 Sep 2018 17:49:24 -0700
|
|
Subject: mas: avoid usage of CGDisplayUsesForceToGray
|
|
|
|
Removes usage of the CGDisplayUsesForceToGray private API.
|
|
|
|
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
|
|
index 074d92bd07e39d4f7d5561dae5cb09aa157b870a..6d92d63437ebf8ce68612e6fbbc1c767f23a7727 100644
|
|
--- a/ui/display/mac/screen_mac.mm
|
|
+++ b/ui/display/mac/screen_mac.mm
|
|
@@ -159,7 +159,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {
|
|
display.set_color_depth(Display::kDefaultBitsPerPixel);
|
|
display.set_depth_per_component(Display::kDefaultBitsPerComponent);
|
|
}
|
|
+#if IS_MAS_BUILD()
|
|
+ // This is equivalent to the CGDisplayUsesForceToGray() API as at 2018-08-06,
|
|
+ // but avoids usage of the private API.
|
|
+ CFStringRef app = CFSTR("com.apple.CoreGraphics");
|
|
+ CFStringRef key = CFSTR("DisplayUseForcedGray");
|
|
+ Boolean key_valid = false;
|
|
+ display.set_is_monochrome(
|
|
+ CFPreferencesGetAppBooleanValue(key, app, &key_valid));
|
|
+#else
|
|
display.set_is_monochrome(CGDisplayUsesForceToGray());
|
|
+#endif
|
|
|
|
// Query the display's refresh rate.
|
|
{
|