cocoa_common: check if the screen has a menubar in a more generic way

Fixes #274
This commit is contained in:
Stefano Pigozzi 2013-10-09 00:32:02 +02:00
parent 16450fab3f
commit 177c89d948
1 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,9 @@
- (BOOL)hasMenubar
{
return [self isEqual: [NSScreen screens][0]];
NSRect vF = [self visibleFrame];
NSRect f = [self frame];
return f.size.height + f.origin.y > vF.size.height + vF.origin.y;
}
@end