Bug 1403432 - Show window titles when the inspector is launched in windowed mode. r=mstange, a=ritu
authorStephen A Pohl <spohl.mozilla.bugs@gmail.com>
Sun, 08 Oct 2017 20:34:53 -0400
changeset 432326 b0466dd6b31a
parent 432325 4533abfd5e9c
child 432327 b71429f5363a
push id7930
push userryanvm@gmail.com
push date2017-10-09 19:21 +0000
treeherdermozilla-beta@b92b69f3503e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange, ritu
bugs1403432
milestone57.0
Bug 1403432 - Show window titles when the inspector is launched in windowed mode. r=mstange, a=ritu
widget/cocoa/nsCocoaWindow.mm
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -2373,17 +2373,23 @@ void nsCocoaWindow::SetWindowAnimationTy
   mAnimationType = aType;
 }
 
 void
 nsCocoaWindow::SetDrawsTitle(bool aDrawTitle)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
-  [mWindow setWantsTitleDrawn:aDrawTitle];
+  if (![mWindow drawsContentsIntoWindowFrame]) {
+    // If we don't draw into the window frame, we always want to display window
+    // titles.
+    [mWindow setWantsTitleDrawn:YES];
+  } else {
+    [mWindow setWantsTitleDrawn:aDrawTitle];
+  }
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 void
 nsCocoaWindow::SetUseBrightTitlebarForeground(bool aBrightForeground)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;