mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-03 04:05:49 +01:00
macOS Sierra (10.12): Disallow Automatic Window Tabbing
Automatic Window Tabbing in macOS Sierra causes a menu item called "Show Tab Bar" to appear under the Window menu in the menu bar. Selecting this option causes a double-title bar effect as there is no option in OpenRCT2 to make new tabbed "documents". This double-title bar can be untoggled by selecting "Hide Tab Bar". I don't think OpenRCT2 is going to become a tabbed document-oriented themepark simulator anytime soon. Thanks, but no thanks Sierra. References: * https://codereview.chromium.org/2325313002/ * https://hg.mozilla.org/releases/mozilla-aurora/rev/385b9ea08ff7 * Use better Obj-C styling for macos_disallow_automatic_window_tabbing()
This commit is contained in:
committed by
Michael Steenbeek
parent
2bafea9551
commit
dc848bb8e3
@@ -24,6 +24,15 @@
|
||||
#include "../localisation/language.h"
|
||||
#include "../config/Config.h"
|
||||
|
||||
void macos_disallow_automatic_window_tabbing()
|
||||
{
|
||||
@autoreleasepool {
|
||||
if ([NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:)]) {
|
||||
[NSWindow setAllowsAutomaticWindowTabbing:NO];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool platform_check_steam_overlay_attached() {
|
||||
STUB();
|
||||
return false;
|
||||
|
||||
@@ -235,4 +235,8 @@ void core_init();
|
||||
void platform_posix_sub_resolve_openrct_data_path(utf8 *out, size_t size);
|
||||
#endif
|
||||
|
||||
#ifdef __MACOSX__
|
||||
void macos_disallow_automatic_window_tabbing();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -617,6 +617,9 @@ static void platform_create_window()
|
||||
SDL_SetWindowGrab(gWindow, gConfigGeneral.trap_cursor ? SDL_TRUE : SDL_FALSE);
|
||||
SDL_SetWindowMinimumSize(gWindow, 720, 480);
|
||||
platform_init_window_icon();
|
||||
#ifdef __MACOSX__
|
||||
macos_disallow_automatic_window_tabbing();
|
||||
#endif
|
||||
|
||||
// Initialise the surface, palette and draw buffer
|
||||
platform_resize(width, height);
|
||||
|
||||
Reference in New Issue
Block a user