diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e980c547..8ef9ed79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: timeout-minutes: 4 env: CFLAGS: -Werror - MACOSX_DEPLOYMENT_TARGET: 10.8 + MACOSX_DEPLOYMENT_TARGET: 10.11 CMAKE_OSX_ARCHITECTURES: x86_64;arm64 steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index 2718e45e..ca8850e9 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ more information. ## System requirements -GLFW supports Windows XP and later and macOS 10.8 and later. Linux and other +GLFW supports Windows XP and later and macOS 10.11 and later. Linux and other Unix-like systems running the X Window System are supported even without a desktop environment or modern extensions, although some features require a running window or clipboard manager. The OSMesa backend requires Mesa 6.3. @@ -123,6 +123,7 @@ information on what to include when reporting a bug. - Added `GLFW_UNLIMITED_MOUSE_BUTTONS` input mode that allows mouse buttons beyond the limit of the mouse button tokens to be reported (#2423) + - [Cocoa] Removed support for OS X 10.10 Yosemite and earlier (#2506) - [Wayland] Bugfix: The fractional scaling related objects were not destroyed - [Wayland] Bugfix: `glfwInit` would segfault on compositor with no seat (#2517) - [Null] Added Vulkan 'window' surface creation via `VK_EXT_headless_surface` diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index bed739dc..79b06288 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -3183,8 +3183,8 @@ GLFWAPI void glfwWindowHintString(int hint, const char* value); * * [bundle-guide]: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/ * - * @remark @macos On OS X 10.10 and later the window frame will not be rendered - * at full resolution on Retina displays unless the + * @remark @macos The window frame will not be rendered at full resolution on + * Retina displays unless the * [GLFW_SCALE_FRAMEBUFFER](@ref GLFW_SCALE_FRAMEBUFFER_hint) * hint is `GLFW_TRUE` and the `NSHighResolutionCapable` key is enabled in the * application bundle's `Info.plist`. For more information, see diff --git a/src/cocoa_monitor.m b/src/cocoa_monitor.m index 1abf6ff5..6495e1f3 100644 --- a/src/cocoa_monitor.m +++ b/src/cocoa_monitor.m @@ -137,7 +137,7 @@ static GLFWbool modeIsGood(CGDisplayModeRef mode) if (flags & kDisplayModeStretchedFlag) return GLFW_FALSE; -#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100 +#if MAC_OS_X_VERSION_MAX_ALLOWED == 101100 CFStringRef format = CGDisplayModeCopyPixelEncoding(mode); if (CFStringCompare(format, CFSTR(IO16BitDirectPixels), 0) && CFStringCompare(format, CFSTR(IO32BitDirectPixels), 0)) @@ -164,7 +164,7 @@ static GLFWvidmode vidmodeFromCGDisplayMode(CGDisplayModeRef mode, if (result.refreshRate == 0) result.refreshRate = (int) round(fallbackRefreshRate); -#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100 +#if MAC_OS_X_VERSION_MAX_ALLOWED == 101100 CFStringRef format = CGDisplayModeCopyPixelEncoding(mode); if (CFStringCompare(format, CFSTR(IO16BitDirectPixels), 0) == 0) { @@ -180,7 +180,7 @@ static GLFWvidmode vidmodeFromCGDisplayMode(CGDisplayModeRef mode, result.blueBits = 8; } -#if MAC_OS_X_VERSION_MAX_ALLOWED <= 101100 +#if MAC_OS_X_VERSION_MAX_ALLOWED == 101100 CFRelease(format); #endif /* MAC_OS_X_VERSION_MAX_ALLOWED */ return result; diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 780bc7d3..97626a90 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -310,7 +310,6 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; - (void)windowDidChangeOcclusionState:(NSNotification* )notification { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1090 if ([window->ns.object respondsToSelector:@selector(occlusionState)]) { if ([window->ns.object occlusionState] & NSWindowOcclusionStateVisible) @@ -318,7 +317,6 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; else window->ns.occluded = GLFW_TRUE; } -#endif } @end @@ -1950,7 +1948,6 @@ VkResult _glfwCreateWindowSurfaceCocoa(VkInstance instance, { @autoreleasepool { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 // HACK: Dynamically load Core Animation to avoid adding an extra // dependency for the majority who don't use MoltenVK NSBundle* bundle = [NSBundle bundleWithPath:@"/System/Library/Frameworks/QuartzCore.framework"]; @@ -2027,9 +2024,6 @@ VkResult _glfwCreateWindowSurfaceCocoa(VkInstance instance, } return err; -#else - return VK_ERROR_EXTENSION_NOT_PRESENT; -#endif } // autoreleasepool } diff --git a/src/nsgl_context.m b/src/nsgl_context.m index 57f117ba..e728fc6e 100644 --- a/src/nsgl_context.m +++ b/src/nsgl_context.m @@ -218,14 +218,11 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window, ADD_ATTRIB(kCGLPFASupportsAutomaticGraphicsSwitching); } -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101000 if (ctxconfig->major >= 4) { SET_ATTRIB(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion4_1Core); } - else -#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ - if (ctxconfig->major >= 3) + else if (ctxconfig->major >= 3) { SET_ATTRIB(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core); }