OS X: Fix build with QT_NO_OPENGL
Task-number: QTBUG-31151 Change-Id: I7ed8117ae05ba0eebaf85731c7fdd2bb51d6ed04 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
90a68926f3
commit
a12ba31616
@ -14,7 +14,6 @@ OBJECTIVE_SOURCES += main.mm \
|
|||||||
qnsviewaccessibility.mm \
|
qnsviewaccessibility.mm \
|
||||||
qcocoaautoreleasepool.mm \
|
qcocoaautoreleasepool.mm \
|
||||||
qnswindowdelegate.mm \
|
qnswindowdelegate.mm \
|
||||||
qcocoaglcontext.mm \
|
|
||||||
qcocoanativeinterface.mm \
|
qcocoanativeinterface.mm \
|
||||||
qcocoaeventdispatcher.mm \
|
qcocoaeventdispatcher.mm \
|
||||||
qcocoaapplicationdelegate.mm \
|
qcocoaapplicationdelegate.mm \
|
||||||
@ -51,7 +50,6 @@ HEADERS += qcocoaintegration.h \
|
|||||||
qnsview.h \
|
qnsview.h \
|
||||||
qcocoaautoreleasepool.h \
|
qcocoaautoreleasepool.h \
|
||||||
qnswindowdelegate.h \
|
qnswindowdelegate.h \
|
||||||
qcocoaglcontext.h \
|
|
||||||
qcocoanativeinterface.h \
|
qcocoanativeinterface.h \
|
||||||
qcocoaeventdispatcher.h \
|
qcocoaeventdispatcher.h \
|
||||||
qcocoaapplicationdelegate.h \
|
qcocoaapplicationdelegate.h \
|
||||||
@ -80,6 +78,12 @@ HEADERS += qcocoaintegration.h \
|
|||||||
messages.h \
|
messages.h \
|
||||||
qcocoamimetypes.h
|
qcocoamimetypes.h
|
||||||
|
|
||||||
|
contains(QT_CONFIG, opengl.*) {
|
||||||
|
OBJECTIVE_SOURCES += qcocoaglcontext.mm
|
||||||
|
|
||||||
|
HEADERS += qcocoaglcontext.h
|
||||||
|
}
|
||||||
|
|
||||||
RESOURCES += qcocoaresources.qrc
|
RESOURCES += qcocoaresources.qrc
|
||||||
|
|
||||||
LIBS += -framework Cocoa -framework Carbon -framework IOKit -lcups
|
LIBS += -framework Cocoa -framework Carbon -framework IOKit -lcups
|
||||||
|
@ -59,7 +59,9 @@ public:
|
|||||||
|
|
||||||
QPaintDevice *paintDevice();
|
QPaintDevice *paintDevice();
|
||||||
void flush(QWindow *widget, const QRegion ®ion, const QPoint &offset);
|
void flush(QWindow *widget, const QRegion ®ion, const QPoint &offset);
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
QImage toImage() const Q_DECL_OVERRIDE;
|
QImage toImage() const Q_DECL_OVERRIDE;
|
||||||
|
#endif
|
||||||
void resize (const QSize &size, const QRegion &);
|
void resize (const QSize &size, const QRegion &);
|
||||||
bool scroll(const QRegion &area, int dx, int dy);
|
bool scroll(const QRegion &area, int dx, int dy);
|
||||||
CGImageRef getBackingStoreCGImage();
|
CGImageRef getBackingStoreCGImage();
|
||||||
|
@ -96,10 +96,12 @@ void QCocoaBackingStore::flush(QWindow *win, const QRegion ®ion, const QPoint
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
QImage QCocoaBackingStore::toImage() const
|
QImage QCocoaBackingStore::toImage() const
|
||||||
{
|
{
|
||||||
return m_qImage;
|
return m_qImage;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void QCocoaBackingStore::resize(const QSize &size, const QRegion &)
|
void QCocoaBackingStore::resize(const QSize &size, const QRegion &)
|
||||||
{
|
{
|
||||||
|
@ -113,7 +113,9 @@ public:
|
|||||||
|
|
||||||
bool hasCapability(QPlatformIntegration::Capability cap) const;
|
bool hasCapability(QPlatformIntegration::Capability cap) const;
|
||||||
QPlatformWindow *createPlatformWindow(QWindow *window) const;
|
QPlatformWindow *createPlatformWindow(QWindow *window) const;
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
|
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
|
||||||
|
#endif
|
||||||
QPlatformBackingStore *createPlatformBackingStore(QWindow *widget) const;
|
QPlatformBackingStore *createPlatformBackingStore(QWindow *widget) const;
|
||||||
|
|
||||||
QAbstractEventDispatcher *createEventDispatcher() const;
|
QAbstractEventDispatcher *createEventDispatcher() const;
|
||||||
|
@ -401,9 +401,11 @@ bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) cons
|
|||||||
{
|
{
|
||||||
switch (cap) {
|
switch (cap) {
|
||||||
case ThreadedPixmaps:
|
case ThreadedPixmaps:
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
case OpenGL:
|
case OpenGL:
|
||||||
case ThreadedOpenGL:
|
case ThreadedOpenGL:
|
||||||
case BufferQueueingOpenGL:
|
case BufferQueueingOpenGL:
|
||||||
|
#endif
|
||||||
case WindowMasks:
|
case WindowMasks:
|
||||||
case MultipleWindows:
|
case MultipleWindows:
|
||||||
case ForeignWindows:
|
case ForeignWindows:
|
||||||
@ -420,6 +422,7 @@ QPlatformWindow *QCocoaIntegration::createPlatformWindow(QWindow *window) const
|
|||||||
return new QCocoaWindow(window);
|
return new QCocoaWindow(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
QPlatformOpenGLContext *QCocoaIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
|
QPlatformOpenGLContext *QCocoaIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
|
||||||
{
|
{
|
||||||
QCocoaGLContext *glContext = new QCocoaGLContext(context->format(),
|
QCocoaGLContext *glContext = new QCocoaGLContext(context->format(),
|
||||||
@ -428,6 +431,7 @@ QPlatformOpenGLContext *QCocoaIntegration::createPlatformOpenGLContext(QOpenGLCo
|
|||||||
context->setNativeHandle(glContext->nativeHandle());
|
context->setNativeHandle(glContext->nativeHandle());
|
||||||
return glContext;
|
return glContext;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QPlatformBackingStore *QCocoaIntegration::createPlatformBackingStore(QWindow *window) const
|
QPlatformBackingStore *QCocoaIntegration::createPlatformBackingStore(QWindow *window) const
|
||||||
{
|
{
|
||||||
|
@ -61,15 +61,19 @@ class QCocoaNativeInterface : public QPlatformNativeInterface
|
|||||||
public:
|
public:
|
||||||
QCocoaNativeInterface();
|
QCocoaNativeInterface();
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
void *nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context);
|
void *nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context);
|
||||||
|
#endif
|
||||||
void *nativeResourceForWindow(const QByteArray &resourceString, QWindow *window);
|
void *nativeResourceForWindow(const QByteArray &resourceString, QWindow *window);
|
||||||
|
|
||||||
NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource) Q_DECL_OVERRIDE;
|
NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
Q_INVOKABLE void beep();
|
Q_INVOKABLE void beep();
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
static void *cglContextForContext(QOpenGLContext *context);
|
static void *cglContextForContext(QOpenGLContext *context);
|
||||||
static void *nsOpenGLContextForContext(QOpenGLContext* context);
|
static void *nsOpenGLContextForContext(QOpenGLContext* context);
|
||||||
|
#endif
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void onAppFocusWindowChanged(QWindow *window);
|
void onAppFocusWindowChanged(QWindow *window);
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qcocoanativeinterface.h"
|
#include "qcocoanativeinterface.h"
|
||||||
#include "qcocoaglcontext.h"
|
|
||||||
#include "qcocoawindow.h"
|
#include "qcocoawindow.h"
|
||||||
#include "qcocoamenu.h"
|
#include "qcocoamenu.h"
|
||||||
#include "qcocoamenubar.h"
|
#include "qcocoamenubar.h"
|
||||||
@ -53,8 +52,11 @@
|
|||||||
#include <qpixmap.h>
|
#include <qpixmap.h>
|
||||||
#include <qpa/qplatformwindow.h>
|
#include <qpa/qplatformwindow.h>
|
||||||
#include "qsurfaceformat.h"
|
#include "qsurfaceformat.h"
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
#include <qpa/qplatformopenglcontext.h>
|
#include <qpa/qplatformopenglcontext.h>
|
||||||
#include "qopenglcontext.h"
|
#include "qopenglcontext.h"
|
||||||
|
#include "qcocoaglcontext.h"
|
||||||
|
#endif
|
||||||
#include "qguiapplication.h"
|
#include "qguiapplication.h"
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
|
|
||||||
@ -72,6 +74,7 @@ QCocoaNativeInterface::QCocoaNativeInterface()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
void *QCocoaNativeInterface::nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context)
|
void *QCocoaNativeInterface::nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context)
|
||||||
{
|
{
|
||||||
if (!context)
|
if (!context)
|
||||||
@ -83,16 +86,19 @@ void *QCocoaNativeInterface::nativeResourceForContext(const QByteArray &resource
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void *QCocoaNativeInterface::nativeResourceForWindow(const QByteArray &resourceString, QWindow *window)
|
void *QCocoaNativeInterface::nativeResourceForWindow(const QByteArray &resourceString, QWindow *window)
|
||||||
{
|
{
|
||||||
if (!window->handle())
|
if (!window->handle())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (resourceString == "nsopenglcontext") {
|
if (resourceString == "nsview") {
|
||||||
return static_cast<QCocoaWindow *>(window->handle())->currentContext()->nsOpenGLContext();
|
|
||||||
} else if (resourceString == "nsview") {
|
|
||||||
return static_cast<QCocoaWindow *>(window->handle())->m_contentView;
|
return static_cast<QCocoaWindow *>(window->handle())->m_contentView;
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
|
} else if (resourceString == "nsopenglcontext") {
|
||||||
|
return static_cast<QCocoaWindow *>(window->handle())->currentContext()->nsOpenGLContext();
|
||||||
|
#endif
|
||||||
} else if (resourceString == "nswindow") {
|
} else if (resourceString == "nswindow") {
|
||||||
return static_cast<QCocoaWindow *>(window->handle())->m_nsWindow;
|
return static_cast<QCocoaWindow *>(window->handle())->m_nsWindow;
|
||||||
}
|
}
|
||||||
@ -198,6 +204,7 @@ void QCocoaNativeInterface::onAppFocusWindowChanged(QWindow *window)
|
|||||||
QCocoaMenuBar::updateMenuBarImmediately();
|
QCocoaMenuBar::updateMenuBarImmediately();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
void *QCocoaNativeInterface::cglContextForContext(QOpenGLContext* context)
|
void *QCocoaNativeInterface::cglContextForContext(QOpenGLContext* context)
|
||||||
{
|
{
|
||||||
NSOpenGLContext *nsOpenGLContext = static_cast<NSOpenGLContext*>(nsOpenGLContextForContext(context));
|
NSOpenGLContext *nsOpenGLContext = static_cast<NSOpenGLContext*>(nsOpenGLContextForContext(context));
|
||||||
@ -216,6 +223,7 @@ void *QCocoaNativeInterface::nsOpenGLContextForContext(QOpenGLContext* context)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void QCocoaNativeInterface::addToMimeList(void *macPasteboardMime)
|
void QCocoaNativeInterface::addToMimeList(void *macPasteboardMime)
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,9 @@
|
|||||||
#include <qpa/qplatformwindow.h>
|
#include <qpa/qplatformwindow.h>
|
||||||
#include <QRect>
|
#include <QRect>
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
#include "qcocoaglcontext.h"
|
#include "qcocoaglcontext.h"
|
||||||
|
#endif
|
||||||
#include "qnsview.h"
|
#include "qnsview.h"
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
|
QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
|
||||||
@ -194,8 +196,10 @@ public:
|
|||||||
void setWindowShadow(Qt::WindowFlags flags);
|
void setWindowShadow(Qt::WindowFlags flags);
|
||||||
void setWindowZoomButton(Qt::WindowFlags flags);
|
void setWindowZoomButton(Qt::WindowFlags flags);
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
void setCurrentContext(QCocoaGLContext *context);
|
void setCurrentContext(QCocoaGLContext *context);
|
||||||
QCocoaGLContext *currentContext() const;
|
QCocoaGLContext *currentContext() const;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool setWindowModified(bool modified) Q_DECL_OVERRIDE;
|
bool setWindowModified(bool modified) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
@ -263,7 +267,9 @@ public: // for QNSView
|
|||||||
bool m_windowUnderMouse;
|
bool m_windowUnderMouse;
|
||||||
|
|
||||||
bool m_inConstructor;
|
bool m_inConstructor;
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
QCocoaGLContext *m_glContext;
|
QCocoaGLContext *m_glContext;
|
||||||
|
#endif
|
||||||
QCocoaMenuBar *m_menubar;
|
QCocoaMenuBar *m_menubar;
|
||||||
NSCursor *m_windowCursor;
|
NSCursor *m_windowCursor;
|
||||||
|
|
||||||
|
@ -43,7 +43,9 @@
|
|||||||
#include "qnswindowdelegate.h"
|
#include "qnswindowdelegate.h"
|
||||||
#include "qcocoaautoreleasepool.h"
|
#include "qcocoaautoreleasepool.h"
|
||||||
#include "qcocoaeventdispatcher.h"
|
#include "qcocoaeventdispatcher.h"
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
#include "qcocoaglcontext.h"
|
#include "qcocoaglcontext.h"
|
||||||
|
#endif
|
||||||
#include "qcocoahelpers.h"
|
#include "qcocoahelpers.h"
|
||||||
#include "qcocoanativeinterface.h"
|
#include "qcocoanativeinterface.h"
|
||||||
#include "qnsview.h"
|
#include "qnsview.h"
|
||||||
@ -366,7 +368,9 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw)
|
|||||||
, m_windowModality(Qt::NonModal)
|
, m_windowModality(Qt::NonModal)
|
||||||
, m_windowUnderMouse(false)
|
, m_windowUnderMouse(false)
|
||||||
, m_inConstructor(true)
|
, m_inConstructor(true)
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
, m_glContext(0)
|
, m_glContext(0)
|
||||||
|
#endif
|
||||||
, m_menubar(0)
|
, m_menubar(0)
|
||||||
, m_windowCursor(0)
|
, m_windowCursor(0)
|
||||||
, m_hasModalSession(false)
|
, m_hasModalSession(false)
|
||||||
@ -703,8 +707,10 @@ void QCocoaWindow::setVisible(bool visible)
|
|||||||
[m_contentView setHidden:NO];
|
[m_contentView setHidden:NO];
|
||||||
} else {
|
} else {
|
||||||
// qDebug() << "close" << this;
|
// qDebug() << "close" << this;
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
if (m_glContext)
|
if (m_glContext)
|
||||||
m_glContext->windowWasHidden();
|
m_glContext->windowWasHidden();
|
||||||
|
#endif
|
||||||
QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher());
|
QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher());
|
||||||
QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = 0;
|
QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = 0;
|
||||||
if (cocoaEventDispatcher)
|
if (cocoaEventDispatcher)
|
||||||
@ -1213,6 +1219,7 @@ bool QCocoaWindow::windowIsPopupType(Qt::WindowType type) const
|
|||||||
return ((type & Qt::Popup) == Qt::Popup);
|
return ((type & Qt::Popup) == Qt::Popup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
void QCocoaWindow::setCurrentContext(QCocoaGLContext *context)
|
void QCocoaWindow::setCurrentContext(QCocoaGLContext *context)
|
||||||
{
|
{
|
||||||
m_glContext = context;
|
m_glContext = context;
|
||||||
@ -1222,6 +1229,7 @@ QCocoaGLContext *QCocoaWindow::currentContext() const
|
|||||||
{
|
{
|
||||||
return m_glContext;
|
return m_glContext;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void QCocoaWindow::recreateWindow(const QPlatformWindow *parentWindow)
|
void QCocoaWindow::recreateWindow(const QPlatformWindow *parentWindow)
|
||||||
{
|
{
|
||||||
|
@ -69,14 +69,18 @@ QT_END_NAMESPACE
|
|||||||
bool m_sendUpAsRightButton;
|
bool m_sendUpAsRightButton;
|
||||||
Qt::KeyboardModifiers currentWheelModifiers;
|
Qt::KeyboardModifiers currentWheelModifiers;
|
||||||
bool m_subscribesForGlobalFrameNotifications;
|
bool m_subscribesForGlobalFrameNotifications;
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
QCocoaGLContext *m_glContext;
|
QCocoaGLContext *m_glContext;
|
||||||
bool m_shouldSetGLContextinDrawRect;
|
bool m_shouldSetGLContextinDrawRect;
|
||||||
|
#endif
|
||||||
NSString *m_inputSource;
|
NSString *m_inputSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id)init;
|
- (id)init;
|
||||||
- (id)initWithQWindow:(QWindow *)window platformWindow:(QCocoaWindow *) platformWindow;
|
- (id)initWithQWindow:(QWindow *)window platformWindow:(QCocoaWindow *) platformWindow;
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
- (void)setQCocoaGLContext:(QCocoaGLContext *)context;
|
- (void)setQCocoaGLContext:(QCocoaGLContext *)context;
|
||||||
|
#endif
|
||||||
- (void)flushBackingStore:(QCocoaBackingStore *)backingStore region:(const QRegion &)region offset:(QPoint)offset;
|
- (void)flushBackingStore:(QCocoaBackingStore *)backingStore region:(const QRegion &)region offset:(QPoint)offset;
|
||||||
- (void)setMaskRegion:(const QRegion *)region;
|
- (void)setMaskRegion:(const QRegion *)region;
|
||||||
- (void)invalidateWindowShadowIfNeeded;
|
- (void)invalidateWindowShadowIfNeeded;
|
||||||
|
@ -57,7 +57,9 @@
|
|||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
#include <private/qguiapplication_p.h>
|
#include <private/qguiapplication_p.h>
|
||||||
#include "qcocoabackingstore.h"
|
#include "qcocoabackingstore.h"
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
#include "qcocoaglcontext.h"
|
#include "qcocoaglcontext.h"
|
||||||
|
#endif
|
||||||
#include "qcocoaintegration.h"
|
#include "qcocoaintegration.h"
|
||||||
|
|
||||||
#ifdef QT_COCOA_ENABLE_ACCESSIBILITY_INSPECTOR
|
#ifdef QT_COCOA_ENABLE_ACCESSIBILITY_INSPECTOR
|
||||||
@ -95,8 +97,10 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
|
|||||||
m_buttons = Qt::NoButton;
|
m_buttons = Qt::NoButton;
|
||||||
m_sendKeyEvent = false;
|
m_sendKeyEvent = false;
|
||||||
m_subscribesForGlobalFrameNotifications = false;
|
m_subscribesForGlobalFrameNotifications = false;
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
m_glContext = 0;
|
m_glContext = 0;
|
||||||
m_shouldSetGLContextinDrawRect = false;
|
m_shouldSetGLContextinDrawRect = false;
|
||||||
|
#endif
|
||||||
currentCustomDragTypes = 0;
|
currentCustomDragTypes = 0;
|
||||||
m_sendUpAsRightButton = false;
|
m_sendUpAsRightButton = false;
|
||||||
m_inputSource = 0;
|
m_inputSource = 0;
|
||||||
@ -160,6 +164,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
- (void) setQCocoaGLContext:(QCocoaGLContext *)context
|
- (void) setQCocoaGLContext:(QCocoaGLContext *)context
|
||||||
{
|
{
|
||||||
m_glContext = context;
|
m_glContext = context;
|
||||||
@ -181,6 +186,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
|
|||||||
object:self];
|
object:self];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
- (void) globalFrameChanged:(NSNotification*)notification
|
- (void) globalFrameChanged:(NSNotification*)notification
|
||||||
{
|
{
|
||||||
@ -466,10 +472,12 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
|
|||||||
|
|
||||||
- (void) drawRect:(NSRect)dirtyRect
|
- (void) drawRect:(NSRect)dirtyRect
|
||||||
{
|
{
|
||||||
|
#ifndef QT_NO_OPENGL
|
||||||
if (m_glContext && m_shouldSetGLContextinDrawRect) {
|
if (m_glContext && m_shouldSetGLContextinDrawRect) {
|
||||||
[m_glContext->nsOpenGLContext() setView:self];
|
[m_glContext->nsOpenGLContext() setView:self];
|
||||||
m_shouldSetGLContextinDrawRect = false;
|
m_shouldSetGLContextinDrawRect = false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (m_platformWindow->m_drawContentBorderGradient)
|
if (m_platformWindow->m_drawContentBorderGradient)
|
||||||
NSDrawWindowBackground(dirtyRect);
|
NSDrawWindowBackground(dirtyRect);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user