diff options
author | Kevin Walzer <kw@codebykevin.com> | 2015-11-25 03:13:02 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2015-11-25 03:13:02 (GMT) |
commit | b83823cb9c47ebe34761d4d43a539fb600e087f9 (patch) | |
tree | 488f2e6ce16f942a290281b14b92dc3705430ff7 /macosx/tkMacOSXXStubs.c | |
parent | 4588ca2f16ec042f8d668542c9d2094f729f7012 (diff) | |
download | tk-b83823cb9c47ebe34761d4d43a539fb600e087f9.zip tk-b83823cb9c47ebe34761d4d43a539fb600e087f9.tar.gz tk-b83823cb9c47ebe34761d4d43a539fb600e087f9.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.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index a5f1c60..e87bb39 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 |