DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2221
Version: 1.3-feature
Fix Version: 1.3.0 (r6951)


Matt: please apply this important patch to file src/Fl_cocoa.mm .
It corrects a memory allocation bug where any FLTK application 
calling Fl::ready() may crash !
It also reiterates the previously suggested changes.

Thanks,
Manolo


Index: Fl_cocoa.mm
===================================================================
--- Fl_cocoa.mm (revision 6989)
+++ Fl_cocoa.mm (working copy)
@@ -491,7 +491,6 @@
 {
        NSEvent *retval = [NSApp nextEventMatchingMask:NSAnyEventMask
untilDate:[NSDate dateWithTimeIntervalSinceNow:0]
                                           inMode:NSDefaultRunLoopMode
dequeue:NO];
-       if(retval != nil) [retval release];
        return retval != nil;
 }
 
@@ -1725,7 +1724,7 @@
 - (void)drawRect:(NSRect)rect;
 - (BOOL)acceptsFirstResponder;
 - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent;
-//- (BOOL)performKeyEquivalent:(NSEvent*)theEvent;
+- (BOOL)performKeyEquivalent:(NSEvent*)theEvent;
 - (void)mouseUp:(NSEvent *)theEvent;
 - (void)rightMouseUp:(NSEvent *)theEvent;
 - (void)otherMouseUp:(NSEvent *)theEvent;
@@ -1755,12 +1754,11 @@
 {   
   return YES;
 }
-/*
 - (BOOL)performKeyEquivalent:(NSEvent*)theEvent
 {   
   OSStatus err = cocoaKeyboardHandler(theEvent);
   return (err ? NO : YES);
-}*/
+}
 - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent
 {   
   Fl_Window *w = [(FLWindow*)[theEvent window] getFl_Window];
@@ -2845,7 +2843,7 @@
   [[appleMenu itemAtIndex:0] setTarget:about];
   [appleMenu addItem:[NSMenuItem separatorItem]];
   // Services Menu
-  services = [[[NSMenu alloc] init] autorelease];
+  services = [[NSMenu alloc] init];
   [appleMenu addItemWithTitle:@"Services" action:nil keyEquivalent:@""];
   [appleMenu setSubmenu: services forItem: [appleMenu itemWithTitle:
@"Services"]];
   // Hide AppName


Link: http://www.fltk.org/str.php?L2221
Version: 1.3-feature
Fix Version: 1.3.0 (r6951)

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

Reply via email to