MacOSX Menu Bar issues

Issue #351 new
Robert Ball
created an issue

Any graphical programs run under emu that display a Menu Bar (eg. wm/sh) do not display their Menu Bar on startup.

The menus are created correctly programatically.

Upon Cmd+Tab'ing away to another Mac OS X application, then back to emu, the Menu Bar is correctly displayed.

Comments (1)

  1. Robert Ball reporter

    Ends up the InvalidateMenuBar() function call did not work, but hiding it first did.

    Additionally, to make the (now visible) menus clickable on startup without having to tab away and back again, an empty nib file must be provided in the correct directory structure that the Mac OS X dynamic loading system expects.

    Here's the fix. I removed all the hg diff junk mentioning makefile changes and binaries that changed:

    inferno-os# hg diff
    ...
    diff -r 62ae0f75aa71 emu/MacOSX/win.c
    --- a/emu/MacOSX/win.c  Thu Apr 20 23:47:36 2017 +0100
    +++ b/emu/MacOSX/win.c  Fri Sep 01 15:18:27 2017 -0400
    @@ -179,6 +179,7 @@
                kFullScreenCmd, &index);
        InsertMenu(viewMenu, GetMenuID(windMenu));
    
    +   HideMenuBar();
        DrawMenuBar();
        uint32_t windowAttrs = 0
                    | kWindowCloseBoxAttribute
    inferno-os# 
    

    These changes must also be made:

    • inferno-os# cd MacOSX/386/bin
    • bin# mkdir Contents Contents/Resources
    • bin# touch emu.nib
    • bin#
  2. Log in to comment