From 278c821ff46f9232b0ab9f0e08077b5c8c773178 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 24 Feb 2011 16:58:00 +0000 Subject: Mac OS only: allows to print a menu window. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8470 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index c54ecd073..2981b565e 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1239,10 +1239,13 @@ extern "C" { 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 @@ int Fl_X::screen_init(XRectangle screens[], float dpi[]) nil]; [NSApp orderFrontStandardAboutPanelWithOptions:options]; } +//#include - (void)printPanel { Fl_Printer printer; -- cgit v1.2.3