[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -getRed:green:blue:alpha: not defined for the NSColor
From: |
Keith David Bershatsky |
Subject: |
Re: -getRed:green:blue:alpha: not defined for the NSColor |
Date: |
Sat, 13 Jul 2019 11:10:29 -0700 |
The following change made with 9624f609493da7c08016ba00d6895bad0fe26a0e is what
prevents Emacs on OSX 10.6.8 from working. Would it be possible for the Emacs
team to put in a condition that permits Emacs on OSX 10.6 to use the two lines
of code that were removed? [I do not know what is the earliest version of OSX
that can make use of two new lines of code without breaking.]
diff --git a/src/nsimage.m b/src/nsimage.m
index 33236c4..0249d22 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -313,8 +313,8 @@ - (instancetype)setXBMColor: (NSColor *)color
if (bmRep == nil || color == nil)
return self;
- if ([color colorSpaceName] != NSCalibratedRGBColorSpace)
- rgbColor = [color colorUsingColorSpaceName: NSCalibratedRGBColorSpace];
+ if ([color colorSpace] != [NSColorSpace deviceRGBColorSpace])
+ rgbColor = [color colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]];
else
rgbColor = color;