summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXXStubs.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-12-07 02:04:45 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-12-07 02:04:45 (GMT)
commite82200cb0ca4389ea75f8ae0c2096358a985c14e (patch)
tree91a16332713cfc52d7f400a64513ff1e5646cd35 /macosx/tkMacOSXXStubs.c
parent7f2c3a3f39d6a76f0656cbffc7e589b1a59bc346 (diff)
downloadtk-e82200cb0ca4389ea75f8ae0c2096358a985c14e.zip
tk-e82200cb0ca4389ea75f8ae0c2096358a985c14e.tar.gz
tk-e82200cb0ca4389ea75f8ae0c2096358a985c14e.tar.bz2
Fix for zombie windows on El Capitan/OS X 10.11; thanks to Marc Culler for patch
Diffstat (limited to 'macosx/tkMacOSXXStubs.c')
-rw-r--r--macosx/tkMacOSXXStubs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index f8adf1e..4bdd1c4 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -142,7 +142,6 @@ TkpOpenDisplay(
static NSRect maxBounds = {{0, 0}, {0, 0}};
static char vendor[25] = "";
NSArray *cgVers;
- NSAutoreleasePool *pool;
if (gMacDisplay != NULL) {
if (strcmp(gMacDisplay->display->display_name, display_name) == 0) {
@@ -152,6 +151,8 @@ TkpOpenDisplay(
}
}
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
+
display = (Display *) ckalloc(sizeof(Display));
screen = (Screen *) ckalloc(sizeof(Screen));
bzero(display, sizeof(Display));
@@ -166,7 +167,6 @@ TkpOpenDisplay(
display->default_screen = 0;
display->display_name = (char *) macScreenName;
- pool = [NSAutoreleasePool new];
cgVers = [[[NSBundle bundleWithIdentifier:@"com.apple.CoreGraphics"]
objectForInfoDictionaryKey:@"CFBundleShortVersionString"]
componentsSeparatedByString:@"."];
@@ -184,7 +184,7 @@ TkpOpenDisplay(
{
int major, minor, patch;
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 10100
Gestalt(gestaltSystemVersionMajor, (SInt32*)&major);
Gestalt(gestaltSystemVersionMinor, (SInt32*)&minor);
Gestalt(gestaltSystemVersionBugFix, (SInt32*)&patch);