Author: manolo
Date: 2011-04-01 01:32:57 -0700 (Fri, 01 Apr 2011)
New Revision: 8551
Log:
Mac OS: fixes in STR #2588 the warning message "_createMenuRef called with
existing
principal MenuRef already associated with menu".
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 2011-03-31 16:06:59 UTC (rev 8550)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2011-04-01 08:32:57 UTC (rev 8551)
@@ -1308,14 +1308,15 @@
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)
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit