NSWindow is not receiving any notification when it loses focus NSWindow is not receiving any notification when it loses focus objective-c objective-c

NSWindow is not receiving any notification when it loses focus


You're probably not getting the notification because you actually are never key in the first place. Your window appears to be borderless, and borderless windows don't grab key window status by default.

In your window subclass, be sure to return YES on the following methods:

- (BOOL)canBecomeKeyWindow {     return YES; }- (BOOL)canBecomeMainWindow {     return YES; }