diff options
| author | Manolo Gouy <Manolo> | 2015-08-24 19:09:56 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2015-08-24 19:09:56 +0000 |
| commit | 89589d7c9b99c5fac3e421e26fac4308a2863275 (patch) | |
| tree | 4f52bbfd6435cfd7191d798d85ac097415cc9f95 /src | |
| parent | bb3f67ecf7c96cb0e43b1c6ed3170752390868ad (diff) | |
Remove a compilation warning appearing with Mac OS 10.11 +
explain better the intent of this thread creation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10840 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 7 |
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]; } } } |
