Bug 1408118 - Disable Mac's insertion of its own full screen menu item as we already provide one. r?spohl draft
authorMark Banner <standard8@mozilla.com>
Fri, 13 Oct 2017 08:47:56 +0100
changeset 680420 4b950c58402ecc3b2e0028b4fd2beff2b04d1a62
parent 679629 25aad10380b10b6efa50c2b4d97245f078d870a0
child 735860 a86776cc6c3f90705db2a34f948bd32997a2e95d
push id84509
push userbmo:standard8@mozilla.com
push dateSat, 14 Oct 2017 08:09:17 +0000
reviewersspohl
bugs1408118
milestone58.0a1
Bug 1408118 - Disable Mac's insertion of its own full screen menu item as we already provide one. r?spohl MozReview-Commit-ID: EgCWL00ZfUT
toolkit/xre/MacApplicationDelegate.mm
--- a/toolkit/xre/MacApplicationDelegate.mm
+++ b/toolkit/xre/MacApplicationDelegate.mm
@@ -292,16 +292,22 @@ ProcessPendingGetURLAppleEvents()
     }
   }
 
   return menu;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
 }
 
+- (void)applicationWillFinishLaunching:(NSNotification*)notification {
+  // We provide our own full screen menu item, so we don't want the OS providing
+  // one as well.
+  [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"];
+}
+
 // If we don't handle applicationShouldTerminate:, a call to [NSApp terminate:]
 // (from the browser or from the OS) can result in an unclean shutdown.
 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
 {
   nsCOMPtr<nsIObserverService> obsServ =
            do_GetService("@mozilla.org/observer-service;1");
   if (!obsServ)
     return NSTerminateNow;