mirror of
https://github.com/fltk/fltk.git
synced 2026-05-31 22:04:26 +08:00
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:
+3
-2
@@ -1309,12 +1309,13 @@ void fl_open_display() {
|
|||||||
if ( !beenHereDoneThat ) {
|
if ( !beenHereDoneThat ) {
|
||||||
beenHereDoneThat = 1;
|
beenHereDoneThat = 1;
|
||||||
|
|
||||||
[NSApplication sharedApplication];
|
BOOL need_new_nsapp = (NSApp == nil);
|
||||||
|
if (need_new_nsapp) [NSApplication sharedApplication];
|
||||||
NSAutoreleasePool *localPool;
|
NSAutoreleasePool *localPool;
|
||||||
localPool = [[NSAutoreleasePool alloc] init]; // never released
|
localPool = [[NSAutoreleasePool alloc] init]; // never released
|
||||||
mydelegate = [[FLDelegate alloc] init];
|
mydelegate = [[FLDelegate alloc] init];
|
||||||
[NSApp setDelegate:mydelegate];
|
[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
|
// empty the event queue but keep system events for drag&drop of files at launch
|
||||||
NSEvent *ign_event;
|
NSEvent *ign_event;
|
||||||
|
|||||||
Reference in New Issue
Block a user