summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 936fecf8de..1bd1029863 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -340,12 +340,17 @@ QCocoaScreen *QCocoaIntegration::screenForNSScreen(NSScreen *nsScreen)
bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) const
{
switch (cap) {
- case ThreadedPixmaps:
#ifndef QT_NO_OPENGL
- case OpenGL:
case ThreadedOpenGL:
+ // AppKit expects rendering to happen on the main thread, and we can
+ // easily end up in situations where rendering on secondary threads
+ // will result in visual artifacts, bugs, or even deadlocks, when
+ // building with SDK 10.14 or higher which enbles view layer-backing.
+ return QMacVersion::buildSDK() < QOperatingSystemVersion(QOperatingSystemVersion::MacOSMojave);
+ case OpenGL:
case BufferQueueingOpenGL:
#endif
+ case ThreadedPixmaps:
case WindowMasks:
case MultipleWindows:
case ForeignWindows: