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)





Link: http://www.fltk.org/str.php?L2221
Version: 1.3-feature
Fix Version: 1.3.0 (r6951)
% svn diff mac.H
Index: mac.H
===================================================================
--- mac.H       (revision 6969)
+++ mac.H       (working copy)
@@ -163,6 +163,7 @@
 extern WindowRef MACwindowRef(Fl_Window *w);
 extern Fl_Region MacRectRegionIntersect(Fl_Region current, int x,int y,int w, 
int h);
 extern void MacCollapseWindow(Window w);
+extern void fl_mac_set_about( Fl_Callback *cb, void *user_data, int shortcut = 
0);
 #else
 extern void MacDestroyWindow(Fl_Window*,WindowPtr);
 extern void MacMapWindow(Fl_Window*,WindowPtr);
 
 
 
% svn diff Fl_Sys_Menu_Bar.H
Index: Fl_Sys_Menu_Bar.H
===================================================================
--- Fl_Sys_Menu_Bar.H   (revision 6969)
+++ Fl_Sys_Menu_Bar.H   (working copy)
@@ -39,13 +39,15 @@
 public:
   Fl_Sys_Menu_Bar(int x,int y,int w,int h,const char *l=0)
       : Fl_Menu_Bar(x,y,w,h,l) {
-               deactivate();                   // don't let the old area take 
events
-               fl_sys_menu_bar = this;
+         deactivate();                 // don't let the old area take events
+         fl_sys_menu_bar = this;
          }
   void menu(const Fl_Menu_Item *m);
+#ifdef __APPLE_COCOA__
   int add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, 
int flags=0);
   void remove(int n);
   void replace(int rank, const char *name);
+#endif
 };
 
 #else
 
 
 
% svn diff Fl_cocoa.mm
Index: Fl_cocoa.mm
===================================================================
--- Fl_cocoa.mm (revision 6969)
+++ Fl_cocoa.mm (working copy)
@@ -973,11 +973,13 @@
 //this gets called by CJK character palette input
 OSStatus carbonTextHandler( EventHandlerCallRef nextHandler, EventRef event, 
void *unused )
 {
+  //make sure the key window is an FLTK window
+  NSWindow *keywindow = [NSApp keyWindow];
+  if(keywindow == nil || ![keywindow isMemberOfClass:[FLWindow class]]) return 
eventNotHandledErr;
   //under 10.5 this gets called only after character palette inputs
   //but under 10.6 this gets also called by interpretKeyEvents 
   //during character composition when we don't want to run it
-  if([[NSApp currentEvent] type] == NSKeyDown) return noErr;
-  if( [NSApp keyWindow] == nil) return noErr;
+  if([[NSApp currentEvent] type] != NSSystemDefined) return eventNotHandledErr;
   Fl_Window *window = [(FLWindow*)[NSApp keyWindow] getFl_Window];
   fl_lock_function();
   //int kind = GetEventKind(event);
@@ -1540,6 +1542,11 @@
   i->wait_for_expose = 0;
 
   // FIXME: this is in the Carbon version. Does it need to be here?
+  /* 
+  //I don't think so (MG). This function gets called only when a full
+  //redraw is needed (creation, resize, deminiaturization)
+  //and later in it we set damages to DAMAGE_ALL, so there is no
+  //point in limiting redraw to i->region
   if ( i->xid && window->damage() ) {
     NSView *view = [(NSWindow*)i->xid contentView];
     if ( view && i->region ) {
@@ -1551,7 +1558,7 @@
       }
     }
   }
-   
+  */ 
   if ( i->region ) {
     XDestroyRegion(i->region);
     i->region = 0;
@@ -2868,14 +2875,16 @@
 @end
 
 
-void fl_mac_set_about( Fl_Callback *cb, void *user_data, int shortcut = 0) 
+void fl_mac_set_about( Fl_Callback *cb, void *user_data, int shortcut) 
 /** 
  * Mac OS: attaches a callback to the "About myprog" item of the system 
application menu.
+ * \note  #include <FL/x.H>
  *
  * \author Manolo Gouy
  *
  * \param[in] cb   a callback that will be called by "About myprog" menu item
- * \param[in] user_data   a pointer transmitted as 2nd argument to the callback
+ *                with NULL 1st argument.
+ * \param[in] user_data   a pointer transmitted as 2nd argument to the 
callback.
  * \param[in] shortcut    optional shortcut to attach to the "About myprog" 
menu item (e.g., FL_META+'a')
  */
 {
_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to