mirror of
https://github.com/fltk/fltk.git
synced 2026-05-21 22:51:41 +08:00
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. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9715 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user