summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 4bb2900e5..f1f3100a6 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1000,6 +1000,7 @@ void fl_open_callback(void (*cb)(const char *)) {
- (void)applicationWillUnhide:(NSNotification *)notify;
- (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)client;
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename;
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
@end
@implementation FLDelegate
- (void)windowDidMove:(NSNotification *)notif
@@ -1263,6 +1264,12 @@ void fl_open_callback(void (*cb)(const char *)) {
}
return NO;
}
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
+{
+ // without this, the opening of the 1st window is delayed by several seconds
+ // under Mac OS 10.8 when a file is dragged on the application icon
+ if (fl_mac_os_version >= 100800) [[NSApp mainWindow] orderFront:nil];
+}
@end
@implementation FLApplication