Author: manolo
Date: 2012-11-12 07:57:39 -0800 (Mon, 12 Nov 2012)
New Revision: 9715
Log:
Fix a Mac OS bug appeared with OS X 10.8: when a file is dragged on the 
application icon,
a delay of several seconds occur until the first application window opens.

Modified:
   branches/branch-1.3/src/Fl_cocoa.mm

Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2012-11-10 09:05:37 UTC (rev 9714)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2012-11-12 15:57:39 UTC (rev 9715)
@@ -1000,6 +1000,7 @@
 - (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 @@
   }
   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

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to