mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2024-11-22 10:40:06 +08:00
5.13.2: backport macOS: Account for Big Sur always enabling layer backed views (c5d904639d
)
This commit is contained in:
parent
b08f00b3e3
commit
d0a6ada2ae
@ -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
|
||||
@ -106,7 +113,7 @@
|
||||
"_q_mac_wantsLayer", "QT_MAC_WANTS_LAYER");
|
||||
|
||||
if (wantsLayer != -1 && [self layerEnabledByMacOS]) {
|
||||
qCWarning(lcQpaDrawing) << "Layer-backing cannot be explicitly controlled on 10.14 when built against the 10.14 SDK";
|
||||
qCWarning(lcQpaDrawing) << "Layer-backing can not be explicitly controlled on 10.14 when built against the 10.14 SDK";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user