diff options
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index c8ca494b33..a7ebf4148c 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -43,7 +43,9 @@ #include "qnswindowdelegate.h" #include "qcocoaautoreleasepool.h" #include "qcocoaeventdispatcher.h" +#ifndef QT_NO_OPENGL #include "qcocoaglcontext.h" +#endif #include "qcocoahelpers.h" #include "qcocoanativeinterface.h" #include "qnsview.h" @@ -366,7 +368,9 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw) , m_windowModality(Qt::NonModal) , m_windowUnderMouse(false) , m_inConstructor(true) +#ifndef QT_NO_OPENGL , m_glContext(0) +#endif , m_menubar(0) , m_windowCursor(0) , m_hasModalSession(false) @@ -703,8 +707,10 @@ void QCocoaWindow::setVisible(bool visible) [m_contentView setHidden:NO]; } else { // qDebug() << "close" << this; +#ifndef QT_NO_OPENGL if (m_glContext) m_glContext->windowWasHidden(); +#endif QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher()); QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = 0; if (cocoaEventDispatcher) @@ -1213,6 +1219,7 @@ bool QCocoaWindow::windowIsPopupType(Qt::WindowType type) const return ((type & Qt::Popup) == Qt::Popup); } +#ifndef QT_NO_OPENGL void QCocoaWindow::setCurrentContext(QCocoaGLContext *context) { m_glContext = context; @@ -1222,6 +1229,7 @@ QCocoaGLContext *QCocoaWindow::currentContext() const { return m_glContext; } +#endif void QCocoaWindow::recreateWindow(const QPlatformWindow *parentWindow) { |