Bug 1402577: Display titles in titlebar on macOS when the native titlebar is in use. r=mstange
authorStephen A Pohl <spohl.mozilla.bugs@gmail.com>
Sun, 24 Sep 2017 21:02:32 -0400
changeset 382658 f55d4f566a2d93202e55983fa6ccffa469628f5b
parent 382657 6ac472d619b63159e9a7b048d4fe8993eabc1ec8
child 382659 8bde5c2445523f301edbafb037f1c10de47ac2ef
push id95385
push userspohl@mozilla.com
push dateMon, 25 Sep 2017 01:02:49 +0000
treeherdermozilla-inbound@f55d4f566a2d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1402577
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1402577: Display titles in titlebar on macOS when the native titlebar is in use. r=mstange
widget/cocoa/nsCocoaWindow.mm
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -482,25 +482,16 @@ nsresult nsCocoaWindow::CreateNativeWind
   // BorderlessWindow class.
   else if (features == NSBorderlessWindowMask)
     windowClass = [BorderlessWindow class];
 
   // Create the window
   mWindow = [[windowClass alloc] initWithContentRect:contentRect styleMask:features 
                                  backing:NSBackingStoreBuffered defer:YES];
 
-  if ([mWindow respondsToSelector:@selector(setTitleVisibility:)]) {
-    // By default, hide window titles.
-    [mWindow setTitleVisibility:NSWindowTitleHidden];
-  }
-  if ([mWindow respondsToSelector:@selector(setTitlebarAppearsTransparent:)]) {
-    // By default, hide window titlebars.
-    [mWindow setTitlebarAppearsTransparent:YES];
-  }
-
   // setup our notification delegate. Note that setDelegate: does NOT retain.
   mDelegate = [[WindowDelegate alloc] initWithGeckoWindow:this];
   [mWindow setDelegate:mDelegate];
 
   // Make sure that the content rect we gave has been honored.
   NSRect wantedFrame = [mWindow frameRectForContentRect:contentRect];
   if (!NSEqualRects([mWindow frame], wantedFrame)) {
     // This can happen when the window is not on the primary screen.