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:
Rafael Kitover
2022-08-20 16:08:28 +00:00
parent 8d6a3cff25
commit 7b75f055ea

View File

@@ -29,6 +29,7 @@
#include "internal.h"
#include "../kitty/monotonic.h"
#include <Availability.h>
#include <float.h>
#include <string.h>
@@ -1551,11 +1552,15 @@ void _glfwPlatformUpdateIMEState(_GLFWwindow *w, const GLFWIMEUpdateEvent *ev) {
return NO;
}
#if (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400)
- (NSAccessibilityRole)accessibilityRole
{
return NSAccessibilityTextAreaRole;
}
#endif
- (NSString *)accessibilitySelectedText
{
NSString *text = nil;