summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-08-25 10:57:16 +0000
committerManolo Gouy <Manolo>2015-08-25 10:57:16 +0000
commit03cad454d70c0fa2839286d6442c60847b2e9735 (patch)
tree15c1fd750af4f36299e3ed05c1ae440af83b99c9 /src
parent89589d7c9b99c5fac3e421e26fac4308a2863275 (diff)
It's clearer to implement and use a doNothing: message.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10841 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 43e26ebb0..f1d5e74fa 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1113,6 +1113,7 @@ static FLTextView *fltextview_instance = nil;
- (void)windowDidMiniaturize:(NSNotification *)notif;
- (BOOL)windowShouldClose:(id)fl;
- (void)anyWindowWillClose:(NSNotification *)notif;
+- (void)doNothing:(id)unused;
@end
@@ -1410,6 +1411,10 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
}
fl_unlock_function();
}
+- (void)doNothing:(id)unused
+{
+ return;
+}
@end
@interface FLAppDelegate : NSObject
@@ -1731,10 +1736,10 @@ void fl_open_display() {
name:NSWindowWillCloseNotification
object:nil];
if (![NSThread isMultiThreaded]) {
- // With older OS X versions, it is necessary to create one thread for secondary pthreads to be
+ // With old 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];
+ // We create a thread that does nothing so it completes very fast:
+ [NSThread detachNewThreadSelector:@selector(doNothing:) toTarget:[FLWindowDelegate singleInstance] withObject:nil];
}
}
}