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

[STR New]

Link: http://www.fltk.org/str.php?L2588
Version: 1.3-current


Attached file "cocoa.patch"...


Link: http://www.fltk.org/str.php?L2588
Version: 1.3-current
Index: src/Fl_cocoa.mm
===================================================================
--- src/Fl_cocoa.mm     (revision 8504)
+++ src/Fl_cocoa.mm     (working copy)
@@ -632,6 +632,12 @@
 }
 @end
 
+@interface FLApplication : NSObject
+{
+}
++ (void)sendEvent:(NSEvent *)theEvent;
+@end
+
 /*
  * This function is the central event handler.
  * It reads events from the event queue using the given maximum time
@@ -657,7 +663,7 @@
                                          inMode:NSDefaultRunLoopMode 
dequeue:YES];  
   if (event != nil) {
     got_events = 1;
-    [NSApp sendEvent:event]; // reimplemented in [FLApplication sendevent:]
+    [FLApplication sendEvent:event]; // will then call [NSApplication 
sendevent:]
   }
   fl_lock_function();
   
@@ -1231,13 +1237,8 @@
 }
 @end
 
-@interface FLApplication : NSApplication
-{
-}
-- (void)sendEvent:(NSEvent *)theEvent;
-@end
 @implementation FLApplication
-- (void)sendEvent:(NSEvent *)theEvent
++ (void)sendEvent:(NSEvent *)theEvent
 {
   NSEventType type = [theEvent type];  
   if (type == NSLeftMouseDown) {
@@ -1261,10 +1262,10 @@
     // command.  This one makes all modifiers consistent by always sending key 
ups.
     // FLView treats performKeyEquivalent to keyDown, but performKeyEquivalent 
is
     // still needed for the system menu.
-    [[self keyWindow] sendEvent:theEvent];
+    [[NSApp keyWindow] sendEvent:theEvent];
     return;
     }
-  [super sendEvent:theEvent]; 
+  [NSApp sendEvent:theEvent]; 
 }
 @end
 
@@ -1275,7 +1276,7 @@
   if ( !beenHereDoneThat ) {
     beenHereDoneThat = 1;
          
-    [FLApplication sharedApplication];
+    [NSApplication sharedApplication];
     NSAutoreleasePool *localPool;
     localPool = [[NSAutoreleasePool alloc] init]; // never released
     mydelegate = [[FLDelegate alloc] init];
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to