diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-05 18:52:38 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-05 18:52:38 +0100 |
commit | f6dbdd9c16166f345fd5743886229192c97c2c4f (patch) | |
tree | 05e5e7b806dd627be4e3ba6fc9a32f115847acb0 /src/plugins/platforms/cocoa/qcocoaglcontext.mm | |
parent | b8084618545570a8832d344a2e9586e1226cc697 (diff) | |
parent | 47efa9213d92a4366e03bd6d056837cd5bbadb1e (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/sql/drivers/sqlite/qsql_sqlite.cpp
Change-Id: Ia7cffd2c99ae3d5eea6b5740683c06e921336dcd
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaglcontext.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaglcontext.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm index ba204236ee..8af90b13bf 100644 --- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm +++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm @@ -165,6 +165,16 @@ QSurfaceFormat QCocoaGLContext::format() const return m_format; } +void QCocoaGLContext::windowWasHidden() +{ + // If the window is hidden, we need to unset the m_currentWindow + // variable so that succeeding makeCurrent's will not abort prematurely + // because of the optimization in setActiveWindow. + // Doing a full doneCurrent here is not preferable, because the GL context + // might be rendering in a different thread at this time. + m_currentWindow.clear(); +} + void QCocoaGLContext::swapBuffers(QPlatformSurface *surface) { QWindow *window = static_cast<QCocoaWindow *>(surface)->window(); |