diff options
| author | Manolo Gouy <Manolo> | 2011-02-24 16:58:00 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-02-24 16:58:00 +0000 |
| commit | 278c821ff46f9232b0ab9f0e08077b5c8c773178 (patch) | |
| tree | 2d41234c3f0d48dabb3fe86c46811582c9c657ca /src | |
| parent | 8d9f90e416b90af9a33931be0cda93d5e8c217ce (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 12 |
1 files changed, 8 insertions, 4 deletions
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 <FL/Fl_PostScript.H> - (void)printPanel { Fl_Printer printer; |
