summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXNotify.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/tkMacOSXNotify.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/tkMacOSXNotify.c')
-rw-r--r--macosx/tkMacOSXNotify.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index 4cfb5a9..c703297 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -215,6 +215,7 @@ TkMacOSXEventsSetupProc(
if (flags & TCL_WINDOW_EVENTS &&
![[NSRunLoop currentRunLoop] currentMode]) {
static Tcl_Time zeroBlockTime = { 0, 0 };
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
/* Call this with dequeue=NO -- just checking if the queue is empty. */
NSEvent *currentEvent = [NSApp nextEventMatchingMask:NSAnyEventMask
untilDate:[NSDate distantPast]
@@ -223,6 +224,7 @@ TkMacOSXEventsSetupProc(
if (currentEvent && currentEvent.type > 0) {
Tcl_SetMaxBlockTime(&zeroBlockTime);
}
+ [pool drain];
}
}