Skip to content

Commit

Permalink
macOS: Fix menubar items being enabled when they shouldn't be.
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Sep 1, 2017
1 parent b959be2 commit d7ae313
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -80,14 +80,14 @@ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem
if ([menuItem action] == @selector(toggleFullScreen:)) {
SDL_Window *window = [self findSDLWindow];
if (window == NULL) {
return YES;
return NO;
} else if ((window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_FULLSCREEN_DESKTOP)) != 0) {
return NO;
} else if ((window->flags & SDL_WINDOW_RESIZABLE) == 0) {
return NO;
}
}
return YES;
return [super validateMenuItem:menuItem];
}

- (BOOL)canBecomeKeyWindow
Expand Down

0 comments on commit d7ae313

Please sign in to comment.