From 7b75f055eade4951c0504d067068539644afcc1f Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Sat, 20 Aug 2022 16:08:28 +0000 Subject: [PATCH] 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 --- glfw/cocoa_window.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index a3fa49b1b..2ab036ba4 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -29,6 +29,7 @@ #include "internal.h" #include "../kitty/monotonic.h" +#include #include #include @@ -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;