Fix macos Full Screen Toggle menu item label (#11633)

This commit is contained in:
Nitish Sakhawalkar 2018-01-19 06:27:36 -08:00 committed by shelley vohr
parent d0af17e601
commit 2b4cc0a525
2 changed files with 6 additions and 3 deletions

View file

@ -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 {

View file

@ -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" },