Cocoa: Fix qmlscene flicker on resize.
authorMorten Sorvig <morten.sorvig@nokia.com>
Wed, 24 Aug 2011 06:13:44 +0000 (08:13 +0200)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>
Mon, 29 Aug 2011 11:21:07 +0000 (13:21 +0200)
Update the GL context before sending the geometry
change event to Qt.

Change-Id: If331bfcc7f7b0fd4f2f24d4445c8197ec6af688f
Reviewed-on: http://codereview.qt.nokia.com/3448
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
src/plugins/platforms/cocoa/qcocoawindow.mm

index e594514..b7d7bd8 100644 (file)
@@ -179,12 +179,12 @@ void QCocoaWindow::windowDidMove()
 
 void QCocoaWindow::windowDidResize()
 {
+    if (m_glContext)
+        m_glContext->update();
+
     NSRect rect = [[m_nsWindow contentView]frame];
     QRect geo(rect.origin.x,rect.origin.y,rect.size.width,rect.size.height);
     QWindowSystemInterface::handleSynchronousGeometryChange(window(), geo);
-
-    if (m_glContext)
-        m_glContext->update();
 }