mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 20:27:23 +00:00
osx: fix build on macOS 10.11 and earlier
98f5579 added a safeguard for the deactivation of the automatic tab bar but it still needs a compile time guard. add a forward declaration for the setAllowsAutomaticWindowTabbing method of NSWindow. Fixes #4783
This commit is contained in:
parent
eacd97d536
commit
d355cb618c
@ -25,6 +25,11 @@
|
|||||||
#include "osdep/macosx_versions.h"
|
#include "osdep/macosx_versions.h"
|
||||||
|
|
||||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12)
|
#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12)
|
||||||
|
|
||||||
|
@interface NSWindow (macOS10_12_SDK)
|
||||||
|
+ (void)setAllowsAutomaticWindowTabbing:(BOOL)allow;
|
||||||
|
@end
|
||||||
|
|
||||||
typedef NSUInteger NSWindowStyleMask;
|
typedef NSUInteger NSWindowStyleMask;
|
||||||
static const NSWindowStyleMask NSWindowStyleMaskClosable = NSClosableWindowMask;
|
static const NSWindowStyleMask NSWindowStyleMaskClosable = NSClosableWindowMask;
|
||||||
static const NSWindowStyleMask NSWindowStyleMaskTitled = NSTitledWindowMask;
|
static const NSWindowStyleMask NSWindowStyleMaskTitled = NSTitledWindowMask;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#import "macosx_menubar_objc.h"
|
#import "macosx_menubar_objc.h"
|
||||||
#import "osdep/macosx_application_objc.h"
|
#import "osdep/macosx_application_objc.h"
|
||||||
|
#include "osdep/macosx_compat.h"
|
||||||
|
|
||||||
@implementation MenuBar
|
@implementation MenuBar
|
||||||
{
|
{
|
||||||
@ -34,8 +35,8 @@
|
|||||||
[userDefaults setBool:YES forKey:@"NSDisabledDictationMenuItem"];
|
[userDefaults setBool:YES forKey:@"NSDisabledDictationMenuItem"];
|
||||||
[userDefaults setBool:YES forKey:@"NSDisabledCharacterPaletteMenuItem"];
|
[userDefaults setBool:YES forKey:@"NSDisabledCharacterPaletteMenuItem"];
|
||||||
|
|
||||||
if ([NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)])
|
if ([NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:)])
|
||||||
NSWindow.allowsAutomaticWindowTabbing = NO;
|
[NSWindow setAllowsAutomaticWindowTabbing: NO];
|
||||||
|
|
||||||
menuTree = @[
|
menuTree = @[
|
||||||
@{
|
@{
|
||||||
|
Loading…
Reference in New Issue
Block a user