diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-09-19 12:55:11 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-20 12:04:06 +0200 |
commit | 85708e7377e819649fd17948a77e8a3d6077a4e8 (patch) | |
tree | c18e70e0c041d8223cf1cd0f32112ff11200add0 | |
parent | 13c03d3c28429632a16fd50213aa634ba21c9d97 (diff) |
Revert "Fix Invalid Drawable error when using createWindowContainer on Mac."
This reverts commit 04325bdd26810cd9067ad4b0b9e458b06ce2a3db.
This change breaks qtdeclarative on Mac.
Change-Id: I77b121cc6b283cf7498e93e4b914d2fb68808ab6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.h | 1 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.mm | 9 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h index f75b3e35ca..ca2a15a1cc 100644 --- a/src/plugins/platforms/cocoa/qnsview.h +++ b/src/plugins/platforms/cocoa/qnsview.h @@ -70,7 +70,6 @@ QT_END_NAMESPACE Qt::KeyboardModifiers currentWheelModifiers; bool m_subscribesForGlobalFrameNotifications; QCocoaGLContext *m_glContext; - bool m_drawRectHasBeenCalled; bool m_shouldSetGLContextinDrawRect; } diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index ea8e1b363b..b8a31329fe 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -87,7 +87,6 @@ static QTouchDevice *touchDevice = 0; m_sendKeyEvent = false; m_subscribesForGlobalFrameNotifications = false; m_glContext = 0; - m_drawRectHasBeenCalled = false; m_shouldSetGLContextinDrawRect = false; currentCustomDragTypes = 0; m_sendUpAsRightButton = false; @@ -154,9 +153,9 @@ static QTouchDevice *touchDevice = 0; - (void) setQCocoaGLContext:(QCocoaGLContext *)context { m_glContext = context; - if (m_drawRectHasBeenCalled) { - [m_glContext->nsOpenGLContext() setView:self]; - } else { + [m_glContext->nsOpenGLContext() setView:self]; + if (![m_glContext->nsOpenGLContext() view]) { + //was unable to set view m_shouldSetGLContextinDrawRect = true; } @@ -393,8 +392,6 @@ static QTouchDevice *touchDevice = 0; m_shouldSetGLContextinDrawRect = false; } - m_drawRectHasBeenCalled = true; - if (!m_backingStore) return; |