summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/cocoa/qnsview_drawing.mm11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview_drawing.mm b/src/plugins/platforms/cocoa/qnsview_drawing.mm
index 116a9a73df..14e45a038e 100644
--- a/src/plugins/platforms/cocoa/qnsview_drawing.mm
+++ b/src/plugins/platforms/cocoa/qnsview_drawing.mm
@@ -95,8 +95,15 @@
// by AppKit at a point where we've already set up other parts of the platform plugin
// based on the presence of layers or not. Once we've rewritten these parts to support
// dynamically picking up layer enablement we can let AppKit do its thing.
- return QMacVersion::buildSDK() >= QOperatingSystemVersion::MacOSMojave
- && QMacVersion::currentRuntime() >= QOperatingSystemVersion::MacOSMojave;
+
+ if (QMacVersion::currentRuntime() >= QOperatingSystemVersion::MacOSBigSur)
+ return true; // Big Sur always enables layer-backing, regardless of SDK
+
+ if (QMacVersion::currentRuntime() >= QOperatingSystemVersion::MacOSMojave
+ && QMacVersion::buildSDK() >= QOperatingSystemVersion::MacOSMojave)
+ return true; // Mojave and Catalina enable layers based on the app's SDK
+
+ return false; // Prior versions needed explicitly enabled layer backing
}
- (BOOL)layerExplicitlyRequested