diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index db2fbd70d..07dbaa6b3 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2825,6 +2825,7 @@ void Fl_X::set_cursor(Fl_Cursor c) } - (void)showPanel; - (void)printPanel; +- (void)closePanel:(NSNotification *)notif; @end @implementation FLaboutItemTarget - (void)showPanel @@ -2836,7 +2837,16 @@ void Fl_X::set_cursor(Fl_Cursor c) FL_MAJOR_VERSION, FL_MINOR_VERSION ]] autorelease], @"Credits", nil]; [NSApp orderFrontStandardAboutPanelWithOptions:options]; - } + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(closePanel:) + name:NSWindowWillCloseNotification + object:[NSApp keyWindow]]; +} +- (void)closePanel:(NSNotification *)notif +{ + [[NSApp delegate] windowWillClose:notif]; + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} //#include <FL/Fl_PostScript.H> - (void)printPanel { |
