summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 8a24b9588..43e26ebb0 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1731,9 +1731,10 @@ void fl_open_display() {
name:NSWindowWillCloseNotification
object:nil];
if (![NSThread isMultiThreaded]) {
- // necessary for secondary pthreads to be allowed to use cocoa,
- // especially to create an NSAutoreleasePool.
- [NSThread detachNewThreadSelector:nil toTarget:nil withObject:nil];
+ // With older OS X versions, it is necessary to create one thread for secondary pthreads to be
+ // allowed to use cocoa, especially to create an NSAutoreleasePool.
+ // We create a thread that will complete very fast:
+ [NSThread detachNewThreadSelector:@selector(unhide:) toTarget:NSApp withObject:nil];
}
}
}