Fix build on macOS High Sierra
Check for >= 10.14 using Availability.h to use the accessibilityRole callback which does not seem to be available in 10.13. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
8d6a3cff25
commit
7b75f055ea
1 changed files with 5 additions and 0 deletions
|
|
@ -29,6 +29,7 @@
|
|||
#include "internal.h"
|
||||
#include "../kitty/monotonic.h"
|
||||
|
||||
#include <Availability.h>
|
||||
#include <float.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
@ -1551,11 +1552,15 @@ - (BOOL)isAccessibilitySelectorAllowed:(SEL)selector
|
|||
return NO;
|
||||
}
|
||||
|
||||
#if (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400)
|
||||
|
||||
- (NSAccessibilityRole)accessibilityRole
|
||||
{
|
||||
return NSAccessibilityTextAreaRole;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
- (NSString *)accessibilitySelectedText
|
||||
{
|
||||
NSString *text = nil;
|
||||
|
|
|
|||
Loading…
Reference in a new issue