diff --git a/AppKit/CPPopover.j b/AppKit/CPPopover.j index 1f1edfb87..252f24fa0 100644 --- a/AppKit/CPPopover.j +++ b/AppKit/CPPopover.j @@ -310,9 +310,8 @@ Set the behavior of the CPPopover. It can be: if ([_popoverWindow isClosing]) return; - if (_implementedDelegateMethods & CPPopoverDelegate_popover_shouldClose_) - if (![_delegate popoverShouldClose:self]) - return; + if (![self _popoverShouldClose]) + return; [self _close]; } @@ -346,6 +345,15 @@ Set the behavior of the CPPopover. It can be: [_delegate popoverDidShow:self]; } +/*! @ignore */ +- (BOOL)_popoverShouldClose +{ + if (_implementedDelegateMethods & CPPopoverDelegate_popover_shouldClose_) + return [_delegate popoverShouldClose:self]; + + return YES; +} + /*! @ignore */ - (void)_popoverWillClose { diff --git a/AppKit/_CPPopoverWindow.j b/AppKit/_CPPopoverWindow.j index 46c754ae2..bf5f14700 100644 --- a/AppKit/_CPPopoverWindow.j +++ b/AppKit/_CPPopoverWindow.j @@ -720,11 +720,11 @@ var _CPPopoverWindow_shouldClose_ = 1 << 4, break; } - [_delegate close]; + [_delegate performClose:self]; break; case CPPopoverBehaviorTransient: - [_delegate close]; + [_delegate performClose:self]; break; case CPPopoverBehaviorApplicationDefined: