I dont believe it's doable without really bad hacks
My first though:
Have a view in your NSStatusItem and combine the window.isVisible with the view's visibleRect.
The status bar can't be obscured by windows anyway.
=> didn't work
2. Try
Have a view in your NSStatusItem and try the hack from Proper way to determine if NSView is drawn
=> didn't work
REALLY evil hack that might work
simulate Mouse Clicks via the accessibility api and see if your view gets the event :
what I tried
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Insert code here to initialize your application
item = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain];
item.title = @"TEST";
view = [[DDQuickMenuStatusItemView alloc] init];
view.item = item;
view.title = item.title;
item.view = view;
[NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(checkVisible:) userInfo:nil repeats:YES];
}
- (void)checkVisible:(id)timer {
NSLog(@"NOT WORKING vis: %d", (view.window.isVisible && !NSEqualRects(view.visibleRect, NSZeroRect)));
NSLog(@"NOT WORKING isDrawn: %d", (view.isDrawn));
}