Bug 1130746 - Always position window buttons at their default position in fullscreen mode. r=smichaud, a=lmandel
authorMarkus Stange <mstange@themasta.com>
Mon, 09 Feb 2015 00:50:44 -0500
changeset 249717 89469f4ebfb06ea700c9ff0363f79c7bb88d7fa7
parent 249716 eb13dd6278acfb5fb8d18ebc1f7146f2d4e9e595
child 249718 38875c75fbb2d246d0dadc8bacea2732eac1de47
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud, lmandel
bugs1130746
milestone37.0a2
Bug 1130746 - Always position window buttons at their default position in fullscreen mode. r=smichaud, a=lmandel
widget/cocoa/nsCocoaWindow.mm
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -3261,17 +3261,18 @@ static const NSString* kStateShowsToolba
   if (!NSEqualRects(mWindowButtonsRect, aRect)) {
     mWindowButtonsRect = aRect;
     [self reflowTitlebarElements];
   }
 }
 
 - (NSPoint)windowButtonsPositionWithDefaultPosition:(NSPoint)aDefaultPosition
 {
-  if ([self drawsContentsIntoWindowFrame] && !NSIsEmptyRect(mWindowButtonsRect)) {
+  if ([self drawsContentsIntoWindowFrame] && !NSIsEmptyRect(mWindowButtonsRect) &&
+      !([self styleMask] & NSFullScreenWindowMask)) {
     return NSMakePoint(std::max(mWindowButtonsRect.origin.x, aDefaultPosition.x),
                        std::min(mWindowButtonsRect.origin.y, aDefaultPosition.y));
   }
   return aDefaultPosition;
 }
 
 - (void)placeFullScreenButton:(NSRect)aRect
 {