summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qnsview.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2012-11-26 15:47:02 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-28 21:09:42 +0100
commitbb38d1b1d527b70aa2ca8d50a6a703d2faa5b8a0 (patch)
tree43e1bcf2c833b74d5fe18f525ba20b1688debd0a /src/plugins/platforms/cocoa/qnsview.h
parenta0d379bc9a76dfcce08c69abb30d1fea821fd7d7 (diff)
Cocoa: update OpenGL viewport when nsview moves
NSOpenGLContext expexts an -update call whenever the physical position of the view it draws to changes on screen. Since we don't get geometry callbacks for such views when the parent view moves, we need to register a special notification for that case, and tell Qt that we need to repaint the QWindow that the view is backing. This case does not hit very often, but is evident in MDI applications where the subwindows are OpenGL backed QGraphicsView widgets. Dragging the subwindows around produces garbage inside the windows. Change-Id: I1b162470b03cca6ed722c6c54080459f2c5e91d9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnsview.h')
-rw-r--r--src/plugins/platforms/cocoa/qnsview.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h
index 1ee3697858..f93fd86205 100644
--- a/src/plugins/platforms/cocoa/qnsview.h
+++ b/src/plugins/platforms/cocoa/qnsview.h
@@ -51,6 +51,7 @@
QT_BEGIN_NAMESPACE
class QCocoaWindow;
class QCocoaBackingStore;
+class QCocoaGLContext;
QT_END_NAMESPACE
@interface QNSView : NSView <NSTextInputClient> {
@@ -66,11 +67,12 @@ QT_END_NAMESPACE
bool m_sendKeyEvent;
QStringList *currentCustomDragTypes;
Qt::KeyboardModifiers currentWheelModifiers;
+ bool m_subscribesForGlobalFrameNotifications;
}
- (id)init;
- (id)initWithQWindow:(QWindow *)window platformWindow:(QCocoaWindow *) platformWindow;
-
+- (void)setQCocoaGLContext:(QCocoaGLContext *)context;
- (void)flushBackingStore:(QCocoaBackingStore *)backingStore region:(const QRegion &)region offset:(QPoint)offset;
- (void)setMaskRegion:(const QRegion *)region;
- (void)drawRect:(NSRect)dirtyRect;