Bug 1130746 - Always position window buttons at their default position in fullscreen mode. r=smichaud
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -3320,17 +3320,17 @@ static const NSString* kStateShowsToolba
if (!NSEqualRects(mWindowButtonsRect, aRect)) {
mWindowButtonsRect = aRect;
[self reflowTitlebarElements];
}
}
- (NSPoint)windowButtonsPositionWithDefaultPosition:(NSPoint)aDefaultPosition
{
- if ([self drawsContentsIntoWindowFrame]) {
+ if ([self drawsContentsIntoWindowFrame] && !([self styleMask] & NSFullScreenWindowMask)) {
if (NSIsEmptyRect(mWindowButtonsRect)) {
// Empty rect. Let's hide the buttons.
// Position is in non-flipped window coordinates. Using frame's height
// for the vertical coordinate will move the buttons above the window,
// making them invisible.
return NSMakePoint(0, [self frame].size.height);
}
return NSMakePoint(mWindowButtonsRect.origin.x, mWindowButtonsRect.origin.y);