We're trying to create a modal dialog and block the user from doing anything else until it is closed. But the application menu still shows items for About and Preferences. It would be nice if we had a way to disable or hide these.
As far as I can tell by the time I get to this point the application menu has already been built from the hidden window and there doesn't seem to be a way to replace it with the menus from a new window, but I can still manipulate the menuitems in the hidden window.
So I've added a check when building the application menu to skip items which are collapsed (they are all already hidden).