From 93797ff488c794bf58dbb720b0db3de89fd8c924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20A=2E=20A=CC=81lvarez?= Date: Wed, 6 Nov 2019 21:12:29 +0100 Subject: [PATCH] embiggen menu bar to host's size --- BasiliskII/src/MacOSX/utils_macosx.mm | 3 +++ BasiliskII/src/SDL/video_rootless.cpp | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/BasiliskII/src/MacOSX/utils_macosx.mm b/BasiliskII/src/MacOSX/utils_macosx.mm index 68855488..55dd4a85 100644 --- a/BasiliskII/src/MacOSX/utils_macosx.mm +++ b/BasiliskII/src/MacOSX/utils_macosx.mm @@ -61,6 +61,9 @@ void make_window_transparent(SDL_Window * window) return; } + extern int native_menubar_size; + native_menubar_size = (int)[[NSApp mainMenu] menuBarHeight]; + SDL_SysWMinfo wmInfo; SDL_VERSION(&wmInfo.version); if (!SDL_GetWindowWMInfo(window, &wmInfo)) { diff --git a/BasiliskII/src/SDL/video_rootless.cpp b/BasiliskII/src/SDL/video_rootless.cpp index 2f30d305..40718a0f 100644 --- a/BasiliskII/src/SDL/video_rootless.cpp +++ b/BasiliskII/src/SDL/video_rootless.cpp @@ -15,6 +15,7 @@ extern void make_window_transparent(SDL_Window * window); extern void update_sdl_video(SDL_Surface *s, int numrects, SDL_Rect *rects); +int native_menubar_size = 0; /* * Rootless mode support @@ -231,6 +232,10 @@ uint16 menuBarHeight; bool inMenuSelect = false; static SDL_Rect MaskMenuBar() { + if (native_menubar_size && ReadMacInt16(0x0BAA) == 20) { + // Embiggen menubar + WriteMacInt16(0xBAA, native_menubar_size); + } if (!inMenuSelect) { menuBarHeight = ReadMacInt16(0x0BAA); }