diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 7b01a7929749..e973a51c4fcb 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -732,7 +732,7 @@ enum { [super performClose:sender]; } -- (void)toggleFullScreen:(id)sender { +- (void)toggleFullScreenMode:(id)sender { if (shell_->simple_fullscreen()) shell_->SetSimpleFullScreen(!shell_->IsSimpleFullScreen()); else @@ -1178,7 +1178,7 @@ void NativeWindowMac::SetFullScreen(bool fullscreen) { if (fullscreen == IsFullscreen()) return; - [window_ toggleFullScreen:nil]; + [window_ toggleFullScreenMode:nil]; } bool NativeWindowMac::IsFullscreen() const { diff --git a/atom/browser/ui/cocoa/atom_menu_controller.mm b/atom/browser/ui/cocoa/atom_menu_controller.mm index 2f652ab270de..8bdf4e0c2be3 100644 --- a/atom/browser/ui/cocoa/atom_menu_controller.mm +++ b/atom/browser/ui/cocoa/atom_menu_controller.mm @@ -41,7 +41,10 @@ Role kRolesMap[] = { { @selector(performClose:), "close" }, { @selector(performZoom:), "zoom" }, { @selector(terminate:), "quit" }, - { @selector(toggleFullScreen:), "togglefullscreen" }, + // ↓ is intentionally not `toggleFullScreen`. The macOS full screen menu item behaves weird. + // If we use `toggleFullScreen`, then the menu item will use the default label, and not take + // the one provided. + { @selector(toggleFullScreenMode:), "togglefullscreen" }, { @selector(toggleTabBar:), "toggletabbar" }, { @selector(selectNextTab:), "selectnexttab" }, { @selector(selectPreviousTab:), "selectprevioustab" },