summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXXStubs.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-11-25 03:19:19 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-11-25 03:19:19 (GMT)
commit44411926e57b5c15f9910dcdcde14c666571645e (patch)
tree675f04c49d176dbe08d0c67bcb1757316f1ad1a9 /macosx/tkMacOSXXStubs.c
parent52d9e935fa49fe13831f9e0eddba4e260c88f0f0 (diff)
downloadtk-44411926e57b5c15f9910dcdcde14c666571645e.zip
tk-44411926e57b5c15f9910dcdcde14c666571645e.tar.gz
tk-44411926e57b5c15f9910dcdcde14c666571645e.tar.bz2
Remove multiple deprecated internal API calls on OS X; streamline Apple Events implementation; thanks to Marc Culler for extensive patches
Diffstat (limited to 'macosx/tkMacOSXXStubs.c')
-rw-r--r--macosx/tkMacOSXXStubs.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index 2b9783d..f8adf1e 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -181,7 +181,21 @@ TkpOpenDisplay(
NSAppKitVersionNumber);
}
display->vendor = vendor;
- Gestalt(gestaltSystemVersion, (SInt32 *) &display->release);
+ {
+ int major, minor, patch;
+
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
+ Gestalt(gestaltSystemVersionMajor, (SInt32*)&major);
+ Gestalt(gestaltSystemVersionMinor, (SInt32*)&minor);
+ Gestalt(gestaltSystemVersionBugFix, (SInt32*)&patch);
+#else
+ NSOperatingSystemVersion systemVersion = [[NSProcessInfo processInfo] operatingSystemVersion];
+ major = systemVersion.majorVersion;
+ minor = systemVersion.minorVersion;
+ patch = systemVersion.patchVersion;
+#endif
+ display->release = major << 16 | minor << 8 | patch;
+ }
/*
* These screen bits never change