summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXInit.c4
-rw-r--r--macosx/tkMacOSXWindowEvent.c10
-rw-r--r--macosx/tkMacOSXWm.c2
3 files changed, 9 insertions, 7 deletions
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 997d306..b965a38 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -105,10 +105,9 @@ static void keyboardChanged(CFNotificationCenterRef center, void *observer, CFSt
- (void) _setup: (Tcl_Interp *) interp
{
_eventInterp = interp;
- _mainPool = nil;
+ _mainPool = [NSAutoreleasePool new];
[NSApp setPoolProtected:NO];
_defaultMainMenu = nil;
- NSAutoreleasePool *pool = [NSAutoreleasePool new];
[self _setupMenus];
[self setDelegate:self];
#ifdef TK_MAC_DEBUG_NOTIFICATIONS
@@ -117,7 +116,6 @@ static void keyboardChanged(CFNotificationCenterRef center, void *observer, CFSt
#endif
[self _setupWindowNotifications];
[self _setupApplicationNotifications];
- [pool drain];
}
- (NSString *) tkFrameworkImagePath: (NSString *) image
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 95ebb25..461a94c 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -165,6 +165,10 @@ extern BOOL opaqueTag;
if (winPtr) {
TkGenWMDestroyEvent((Tk_Window) winPtr);
+ if (_windowWithMouse == w) {
+ _windowWithMouse = nil;
+ [w release];
+ }
}
/*
@@ -858,12 +862,9 @@ ConfigureRestrictProc(
/*
* Try to prevent flickers and flashes.
- *
- * This stops the flickers on OSX 10.11. But flashes still occur when
- * the width of the window is 16, 32, 48, 64, 80, 96, 112, 256, 512,
- * 768, ... :^(
*/
[w disableFlushWindow];
+ NSDisableScreenUpdates();
/* Disable Tk drawing until the window has been completely configured.*/
TkMacOSXSetDrawingEnabled(winPtr, 0);
@@ -887,6 +888,7 @@ ConfigureRestrictProc(
while (Tk_DoOneEvent(TK_ALL_EVENTS|TK_DONT_WAIT)) {}
[w enableFlushWindow];
[w flushWindowIfNeeded];
+ NSEnableScreenUpdates();
[NSApp setPoolProtected:NO];
}
}
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 308ee11..3ea2f51 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -902,6 +902,8 @@ TkWmDeadWindow(
[front makeKeyAndOrderFront:NSApp];
}
}
+ [NSApp _resetAutoreleasePool];
+
#if DEBUG_ZOMBIES > 0
fprintf(stderr, "================= Pool dump ===================\n");
[NSAutoreleasePool showPools];
on> Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-11-29 20:09:09 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-11-29 20:09:09 (GMT)
commit39cc9d8a23ee168b1a7330b4ff649d58e28e2a26 (patch)
tree044ae08d764a5e3df19aa1c11c078343a7839b02 /doc
parent1daf54dea7f75ed39c8b7ae5bc65a1c5cf7dcd87 (diff)
downloadtcl-39cc9d8a23ee168b1a7330b4ff649d58e28e2a26.zip
tcl-39cc9d8a23ee168b1a7330b4ff649d58e28e2a26.tar.gz
tcl-39cc9d8a23ee168b1a7330b4ff649d58e28e2a26.tar.bz2
Use the same shebang comment everywhere