summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoaview_mac.mm
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2010-01-08 11:33:52 (GMT)
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2010-01-08 11:33:52 (GMT)
commit4ba439f78aec1caef268dba0f229b8a0242e4c8d (patch)
tree33fbf1a2afc052aad53da2c256c095b8b547da18 /src/gui/kernel/qcocoaview_mac.mm
parenta54b606aef73f49dac451a35b29456bc1584a47e (diff)
downloadQt-4ba439f78aec1caef268dba0f229b8a0242e4c8d.zip
Qt-4ba439f78aec1caef268dba0f229b8a0242e4c8d.tar.gz
Qt-4ba439f78aec1caef268dba0f229b8a0242e4c8d.tar.bz2
Cocoa: Fix painting errors on QGLWidget resizing.
Revby: Trond We need to update the GL context syncronously during the resize to prevent flicker. Use the existing MacGLWindowChange machinery to do that.
Diffstat (limited to 'src/gui/kernel/qcocoaview_mac.mm')
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 9950697..c14798a 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -508,6 +508,13 @@ extern "C" {
} else {
[self setNeedsDisplay:YES];
}
+
+ // Make sure the opengl context is updated on resize.
+ if (0 && qwidgetprivate->isGLWidget) {
+ qwidgetprivate->needWindowChange = true;
+ QEvent event(QEvent::MacGLWindowChange);
+ qApp->sendEvent(qwidget, &event);
+ }
}
- (void)drawRect:(NSRect)aRect