diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index ccac5bf02..f43c34ba7 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -2763,6 +2763,15 @@ CPTexturedBackgroundWindowMask endY = [_windowView bodyOffset] - [[self contentView] frame].origin.y, endFrame = CGRectMake(originX, endY, sheetFrame.size.width, sheetFrame.size.height); + if (_toolbar && [_windowView showsToolbar] && [self isFullPlatformWindow]) + { + originX += [[_toolbar _toolbarView] frameSize].height; + endY += [[_toolbar _toolbarView] frameSize].height; + + startFrame = CGRectMake(originX, -sheetShadowFrame.size.height, sheetFrame.size.width, sheetFrame.size.height); + endFrame = CGRectMake(originX, endY, sheetFrame.size.width, sheetFrame.size.height); + } + // Move the sheet offscreen before ordering front so it doesn't appear briefly [sheet setFrameOrigin:CGPointMake(0, -13000)]; diff --git a/AppKit/CPWindow/_CPWindowView.j b/AppKit/CPWindow/_CPWindowView.j index 8cd74b0e3..11660eaf3 100644 --- a/AppKit/CPWindow/_CPWindowView.j +++ b/AppKit/CPWindow/_CPWindowView.j @@ -742,7 +742,9 @@ _CPWindowViewResizeSlop = 3; - (BOOL)showsToolbar { - return YES; + var styleMaskWindow = [[self window] styleMask]; + + return styleMaskWindow & CPBorderlessWindowMask || styleMaskWindow & CPTitledWindowMask || styleMaskWindow & CPHUDBackgroundWindowMask; } - (CGSize)toolbarOffset