I think what you're actually looking for is when the window looses focus.
You can use the following NSWindowDelegate
method:
windowDidResignMain:
You also have to set canBecomeMainWindow
to YES
- (BOOL)canBecomeMainWindow {
return YES;
}
Make sure to connect it to the delegate and you should be fine.