From e8d7eb1e4619a16e196851dfb7f2f4f2cde59e8d Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sat, 23 Mar 2019 14:38:20 +0100 Subject: Invalidate Quit also when running native file chooser. --- src/Fl_cocoa.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 77a326a7c..2b2cf23fc 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3890,7 +3890,8 @@ int Fl_Cocoa_Window_Driver::set_cursor(const Fl_RGB_Image *image, int hotx, int @end @implementation FLaboutItemTarget - (BOOL)validateMenuItem:(NSMenuItem *)item -{ // invalidate the Quit item of the application menu when running modal +{ // invalidate the Quit item of the application menu when running modal or when in native file chooser + if ([[NSApp keyWindow] isKindOfClass:[NSSavePanel class]]) return NO; if (!Fl::modal() || [item action] != @selector(terminate:)) return YES; return NO; } -- cgit v1.2.3