diff --git a/AppKit/CPMenu/_CPMenuBarWindow.j b/AppKit/CPMenu/_CPMenuBarWindow.j index 60cc01b72..bd6c781fe 100644 --- a/AppKit/CPMenu/_CPMenuBarWindow.j +++ b/AppKit/CPMenu/_CPMenuBarWindow.j @@ -67,6 +67,8 @@ if (self) { + _constrainsToUsableScreen = NO; + [self setLevel:CPMainMenuWindowLevel]; [self setAutoresizingMask:CPWindowWidthSizable]; diff --git a/AppKit/CPMenu/_CPMenuWindow.j b/AppKit/CPMenu/_CPMenuWindow.j index ddd697051..3b5fad84f 100644 --- a/AppKit/CPMenu/_CPMenuWindow.j +++ b/AppKit/CPMenu/_CPMenuWindow.j @@ -87,6 +87,8 @@ _CPMenuWindowAttachedMenuBackgroundStyle = 2; if (self) { + _constrainsToUsableScreen = NO; + [self setLevel:CPPopUpMenuWindowLevel]; [self setHasShadow:YES]; [self setShadowStyle:CPMenuWindowShadowStyle]; diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index c3f0572b5..2980d8958 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -144,6 +144,7 @@ var CPWindowActionMessageKeys = [ BOOL _hasShadow; BOOL _isMovableByWindowBackground; BOOL _isMovable; + BOOL _constrainsToUsableScreen; unsigned _shadowStyle; BOOL _showsResizeIndicator; @@ -253,6 +254,7 @@ CPTexturedBackgroundWindowMask var windowViewClass = [[self class] _windowViewClassForStyleMask:aStyleMask]; _frame = [windowViewClass frameRectForContentRect:aContentRect]; + _constrainsToUsableScreen = YES; [self _setSharesChromeWithPlatformWindow:![CPPlatform isBrowser]]; @@ -729,6 +731,9 @@ CPTexturedBackgroundWindowMask - (CGRect)_pinFrame:(CGRect)aFrame toUsableScreenWidth:(BOOL)pinWidth andHeight:(BOOL)pinHeight { + if (!_constrainsToUsableScreen) + return CGRectMakeCopy(aFrame); + var usableRect = [_platformWindow usableContentFrame], frame = _CGRectMakeCopy(aFrame); diff --git a/AppKit/_CPAutocompleteMenu.j b/AppKit/_CPAutocompleteMenu.j index ed9b4a8bc..165d34c79 100644 --- a/AppKit/_CPAutocompleteMenu.j +++ b/AppKit/_CPAutocompleteMenu.j @@ -270,6 +270,14 @@ var _CPAutocompleteMenuMaximumHeight = 307; @implementation _CPAutocompleteWindow : CPPanel +- (id)initWithContentRect:(CGRect)aContentRect styleMask:(unsigned int)aStyleMask +{ + if (self = [super initWithContentRect:aContentRect styleMask:aStyleMask]) + _constrainsToUsableScreen = NO; + + return self; +} + - (BOOL)becomesKeyOnlyIfNeeded { return YES; diff --git a/AppKit/_CPPopUpList.j b/AppKit/_CPPopUpList.j index 024bc291a..2dfbce85e 100644 --- a/AppKit/_CPPopUpList.j +++ b/AppKit/_CPPopUpList.j @@ -852,6 +852,14 @@ var _CPPopUpListDataSourceKey = @"_CPPopUpListDataSourceKey", @implementation _CPPopUpPanel : CPPanel +- (id)initWithContentRect:(CGRect)aContentRect styleMask:(unsigned int)aStyleMask +{ + if (self = [super initWithContentRect:aContentRect styleMask:aStyleMask]) + _constrainsToUsableScreen = NO; + + return self; +} + - (void)sendEvent:(CPEvent)anEvent { var type = [anEvent type]; diff --git a/AppKit/_CPToolTip.j b/AppKit/_CPToolTip.j index 4f271cc0e..a669d4cf0 100644 --- a/AppKit/_CPToolTip.j +++ b/AppKit/_CPToolTip.j @@ -167,6 +167,8 @@ var _CPToolTipHeight = 24.0, if (self = [super initWithContentRect:toolTipFrame styleMask:aStyleMask]) { + _constrainsToUsableScreen = NO; + textFrameSize.height += 4; _content = [CPTextField labelWithTitle:aString];