diff options
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaglcontext.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaglcontext.mm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm index 47ad930cf6..4d0fa2e28e 100644 --- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm +++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm @@ -333,10 +333,10 @@ bool QCocoaGLContext::makeCurrent(QPlatformSurface *surface) Q_ASSERT(surface->surface()->supportsOpenGL()); - [m_context makeCurrentContext]; - - if (surface->surface()->surfaceClass() == QSurface::Offscreen) + if (surface->surface()->surfaceClass() == QSurface::Offscreen) { + [m_context makeCurrentContext]; return true; + } QWindow *window = static_cast<QCocoaWindow *>(surface)->window(); if (!setActiveWindow(window)) { @@ -344,6 +344,8 @@ bool QCocoaGLContext::makeCurrent(QPlatformSurface *surface) return false; } + [m_context makeCurrentContext]; + // Disable high-resolution surfaces when using the software renderer, which has the // problem that the system silently falls back to a to using a low-resolution buffer // when a high-resolution buffer is requested. This is not detectable using the NSWindow |