Bug 1408118 - Disable Mac's insertion of its own full screen menu item as we already provide one. r?spohl
MozReview-Commit-ID: EgCWL00ZfUT
--- 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;