macOS: protect uses of __block by #if defined(__BLOCKS__) condition
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled

This commit is contained in:
ManoloFLTK
2025-06-04 09:48:44 +02:00
parent 4ef65f304e
commit 1abdeda280
+2 -2
View File
@@ -4722,7 +4722,7 @@ int Fl_Cocoa_Window_Driver::decorated_h()
return h() + bt/s;
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_15_0
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_15_0 && defined(__BLOCKS__)
// Requires -weak_framework ScreenCaptureKit and used by FLTK for macOS ≥ 15.0
static CGImageRef capture_decorated_window_SCK(NSWindow *nswin) {
@@ -4807,7 +4807,7 @@ CGImageRef Fl_Cocoa_Window_Driver::capture_decorated_window_10_5(NSWindow *nswin
// usable with 10.5 and above
CGImageRef img = NULL;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_15_0
# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_15_0 && defined(__BLOCKS__)
if (fl_mac_os_version >= 150000)
img = capture_decorated_window_SCK(nswin);
else