We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4415

Summary: SDL menu bar is nonstandard on Mac
Product: SDL Reporter: foo.null
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: foo.null
Version: 2.0.9   
Hardware: x86   
OS: macOS 10.13   
Attachments: Patch to improve macOS menu bar
Improve menu bar (2)

Description foo.null 2018-12-06 06:21:14 UTC
I'm on macOS 10.14 and I think I'm using or around SDL 2.0.9. This is about the menu bar that SDL sets up which looks like:

<App Name> <Window> <View>

1. View menu never proceeds after the Window menu in any Mac application (it is always before).
2. For SDL, the only purpose of the View menu is for a single fullscreen menu item, which is not justifiable enough to reserve space for a menu. The View menu should thus be removed, and the full screen menu item should be added at the end inside of Window's menu. See built in apps like Dictionary, Chess, App Store (on 10.14) that do this.
3. SDL should add a "Close" menu item to the Window's submenu, and it should be the first item. Its key equivalent should map to command w. Without this, you cannot close the game window via this shortcut, and you cannot close the app's About window via this shortcut.
4. Apps typically use "Enter Full Screen" or "Exit Full Screen" depending on context, not "Toggle Full Screen" which is less user friendly -- I personally care about this point the least.
Comment 1 Sam Lantinga 2018-12-06 19:17:15 UTC
These seem reasonable. Would you like to attach a tested patch that implements what you'd like to see?
Comment 2 foo.null 2018-12-07 06:34:51 UTC
Created attachment 3538 [details]
Patch to improve macOS menu bar

Attached a patch that removes the View menu, adds Close menu item, adds Full screen menu item to Window menu, and disables making the window tabbed for new windows by default (also preventing additional menu items from being added automatically for resizable windows).
Comment 3 foo.null 2018-12-07 06:49:20 UTC
Created attachment 3539 [details]
Improve menu bar (2)

Forgot to add a -release call, otherwise same as first patch.
Comment 4 Sam Lantinga 2018-12-08 19:07:00 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/209066a82aef