Mac OS: fixes in STR #2588 the warning message "_createMenuRef called with existing
principal MenuRef already associated with menu". git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8551 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
885c5fe16d
commit
f4c12d46d6
@ -1308,14 +1308,15 @@ void fl_open_display() {
|
||||
static char beenHereDoneThat = 0;
|
||||
if ( !beenHereDoneThat ) {
|
||||
beenHereDoneThat = 1;
|
||||
|
||||
[NSApplication sharedApplication];
|
||||
|
||||
BOOL need_new_nsapp = (NSApp == nil);
|
||||
if (need_new_nsapp) [NSApplication sharedApplication];
|
||||
NSAutoreleasePool *localPool;
|
||||
localPool = [[NSAutoreleasePool alloc] init]; // never released
|
||||
mydelegate = [[FLDelegate alloc] init];
|
||||
[NSApp setDelegate:mydelegate];
|
||||
[NSApp finishLaunching];
|
||||
|
||||
if (need_new_nsapp) [NSApp finishLaunching];
|
||||
|
||||
// empty the event queue but keep system events for drag&drop of files at launch
|
||||
NSEvent *ign_event;
|
||||
do ign_event = [NSApp nextEventMatchingMask:(NSAnyEventMask & ~NSSystemDefinedMask)
|
||||
|
Loading…
Reference in New Issue
Block a user