summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXXStubs.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-12-15 02:50:56 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-12-15 02:50:56 (GMT)
commitc23b714ab089bf546c9cc37188f29274b4e4991a (patch)
treec0d8acf525b0ffd8ac7769cfc2eabccc1470bb8c /macosx/tkMacOSXXStubs.c
parent66ba0bfddcbc40934af2383e187fc55d981902f4 (diff)
downloadtk-c23b714ab089bf546c9cc37188f29274b4e4991a.zip
tk-c23b714ab089bf546c9cc37188f29274b4e4991a.tar.gz
tk-c23b714ab089bf546c9cc37188f29274b4e4991a.tar.bz2
Fix for some redraw issues on Tk-Cocoa on OS X 10.11; further refinement of memory management; thanks to Marc Culler for patches
Diffstat (limited to 'macosx/tkMacOSXXStubs.c')
-rw-r--r--macosx/tkMacOSXXStubs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index c39d42d..53d1eb8 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -142,8 +142,8 @@ TkpOpenDisplay(
static NSRect maxBounds = {{0, 0}, {0, 0}};
static char vendor[25] = "";
NSArray *cgVers;
-
-
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
+
if (gMacDisplay != NULL) {
if (strcmp(gMacDisplay->display->display_name, display_name) == 0) {
return gMacDisplay;
@@ -152,8 +152,6 @@ TkpOpenDisplay(
}
}
- NSAutoreleasePool *pool = [NSAutoreleasePool new];
-
display = ckalloc(sizeof(Display));
screen = ckalloc(sizeof(Screen));
bzero(display, sizeof(Display));