diff options
author | culler <culler> | 2020-07-22 02:09:02 (GMT) |
---|---|---|
committer | culler <culler> | 2020-07-22 02:09:02 (GMT) |
commit | f8b3a93842b3f805b1a470c0673fe2c1048a32b1 (patch) | |
tree | 4a060055fab784f8f11b91fd2bd0e9e5c91bf148 | |
parent | 76864c8a9ccb1c3400b2482b6d3c8f9d0d1101f9 (diff) | |
download | tk-f8b3a93842b3f805b1a470c0673fe2c1048a32b1.zip tk-f8b3a93842b3f805b1a470c0673fe2c1048a32b1.tar.gz tk-f8b3a93842b3f805b1a470c0673fe2c1048a32b1.tar.bz2 |
Fix some compiler warnings on Sierra.
-rw-r--r-- | macosx/tkMacOSXColor.c | 11 | ||||
-rw-r--r-- | macosx/tkMacOSXNotify.c | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c index a0eaa84..fd424cd 100644 --- a/macosx/tkMacOSXColor.c +++ b/macosx/tkMacOSXColor.c @@ -267,6 +267,16 @@ GetEntryFromPixelCode( *---------------------------------------------------------------------- */ +/* + * Apple claims that linkColor is available in 10.10 but the declaration + * does not appear in NSColor.h until later. Declaring it in a category + * appears to be harmless and stops the compiler warnings. + */ + +@interface NSColor(TkColor) +@property(class, strong, readonly) NSColor *linkColor; +@end + static NSColorSpace* sRGB = NULL; static CGFloat windowBackground[4] = {236.0 / 255, 236.0 / 255, 236.0 / 255, 1.0}; @@ -336,6 +346,7 @@ SetCGColorComponents( break; case 2: if ([NSApp macOSVersion] > 100900) { + #if MAC_OS_X_VERSION_MAX_ALLOWED > 1090 color = [[NSColor labelColor] colorUsingColorSpace:sRGB]; #endif diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c index 367f3b6..83b4695 100644 --- a/macosx/tkMacOSXNotify.c +++ b/macosx/tkMacOSXNotify.c @@ -156,6 +156,7 @@ void DebugPrintQueue(void) * this block should be removed. */ +# if MAC_OSX_VERSION_MAX_ALLOWED >= 101500 if ([theEvent type] == NSAppKitDefined) { static Bool aWindowIsMoving = NO; switch([theEvent subtype]) { @@ -174,6 +175,7 @@ void DebugPrintQueue(void) break; } } +#endif [super sendEvent:theEvent]; [NSApp tkCheckPasteboard]; |