Author: manolo
Date: 2011-02-24 08:58:00 -0800 (Thu, 24 Feb 2011)
New Revision: 8470
Log:
Mac OS only: allows to print a menu window.

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-02-24 10:27:33 UTC (rev 8469)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2011-02-24 16:58:00 UTC (rev 8470)
@@ -1239,10 +1239,13 @@
   NSEventType type = [theEvent type];  
   if (type == NSLeftMouseDown) {
     Fl_Window *grab = Fl::grab();
-    if (grab && grab != [(FLWindow *)[theEvent window] getFl_Window]) {
-      // a click event out of a menu window, so we should close this menu
-      // done here to catch also clicks on window title bar/resize box 
-      cocoaMouseHandler(theEvent);
+    if (grab) {
+      FLWindow *win = (FLWindow *)[theEvent window];
+      if ( [win isKindOfClass:[FLWindow class]] && grab != [win getFl_Window]) 
{
+       // a click event out of a menu window, so we should close this menu
+       // done here to catch also clicks on window title bar/resize box 
+       cocoaMouseHandler(theEvent);
+      }
     }
   } else if (type == NSApplicationDefined) {
     if ([theEvent subtype] == FLTKDataReadyEvent) {
@@ -2768,6 +2771,7 @@
                             nil];
     [NSApp  orderFrontStandardAboutPanelWithOptions:options];
   }
+//#include <FL/Fl_PostScript.H>
 - (void)printPanel
 {
   Fl_Printer printer;

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

Reply via email to