summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Meyer <cmeyer1969@gmail.com>2013-09-13 00:43:07 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-13 19:26:12 +0200
commite19e1aae6990e46c766c5f7af02dfb5ffbf7c169 (patch)
tree001db358b96c9df20ac302b83f3cb8d43588bd7a
parent44a58de2aea6d2ac71efe7261a398effbf139f3f (diff)
Revert recent attempt to fix Invalid Drawable error on Mac.
This reverts commit 59fd36bb914cae248d3c5100dd734d6d90a58dca, which caused other drawing problems. Change-Id: I3bb75fd3ca1cd21ffbb9ef5474266f4cd615a64a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
-rw-r--r--src/plugins/platforms/cocoa/qnsview.h1
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm9
2 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h
index a7664887bf..3ee994427b 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 9fc74ea72b..c2ffe96f8c 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;