Bug 1130746 - Always position window buttons at their default position in fullscreen mode. r=smichaud
authorMarkus Stange <mstange@themasta.com>
Mon, 09 Feb 2015 00:50:44 -0500
changeset 241818 8d85dce8ab6e3662230b22cbf8af700de17b69d2
parent 241817 41e390a2cf6ee8d82c9c7d94442db3d08cc63886
child 241819 c0d3d80eb41dace8814426da239a50fcde82d5c6
push id624
push userdburns@mozilla.com
push dateTue, 10 Feb 2015 13:30:25 +0000
reviewerssmichaud
bugs1130746
milestone38.0a1
Bug 1130746 - Always position window buttons at their default position in fullscreen mode. r=smichaud
widget/cocoa/nsCocoaWindow.mm
--- 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);