summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorculler <culler>2019-07-16 18:35:54 (GMT)
committerculler <culler>2019-07-16 18:35:54 (GMT)
commitda8e897eb8aea3620f7432c8e41493594a15b33f (patch)
tree1b0efd824816a305c9306e30119ee744f494964d /macosx
parent287df04fb38894ffdeb0e91adcbcdf3300cbbd04 (diff)
downloadtk-da8e897eb8aea3620f7432c8e41493594a15b33f.zip
tk-da8e897eb8aea3620f7432c8e41493594a15b33f.tar.gz
tk-da8e897eb8aea3620f7432c8e41493594a15b33f.tar.bz2
Fix two 'unrecognized selector' crashes in macOS 10.9 and 10.10
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXColor.c10
-rw-r--r--macosx/tkMacOSXWm.c7
2 files changed, 9 insertions, 8 deletions
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index f291289..015c164 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/tkMacOSXColor.c
@@ -339,11 +339,11 @@ SetCGColorComponents(
color = [[NSColor selectedTextColor] colorUsingColorSpace: deviceRGB];
break;
case 2:
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
- color = [[NSColor labelColor] colorUsingColorSpace: deviceRGB];
-#else
- color = [[NSColor textColor] colorUsingColorSpace: deviceRGB];
-#endif
+ if ([NSApp macMinorVersion] > 9) {
+ color = [[NSColor labelColor] colorUsingColorSpace: deviceRGB];
+ } else {
+ color = [[NSColor textColor] colorUsingColorSpace: deviceRGB];
+ }
break;
case 3:
color = [[NSColor controlTextColor] colorUsingColorSpace:
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 71eb433..4040302 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -6876,10 +6876,11 @@ ApplyWindowAttributeFlagChanges(
* height. This causes the window manager to refuse to
* allow the window to be resized when it is a split
* window. To work around this we make the max size equal
- * to the screen size.
+ * to the screen size. (For 10.11 and up, only)
*/
-
- [macWindow setMaxFullScreenContentSize:screenSize];
+ if ([NSApp macMinorVersion] > 10) {
+ [macWindow setMaxFullScreenContentSize:screenSize];
+ }
}
}
#endif