From 3676380190908d79fe547cf2a5efc3efdba25af8 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 27 Aug 2010 17:51:39 +0200 Subject: Allow QGLWidgets to draw them selves under -graphicssystem raster again... Reviewed-by: Fabien Freling --- src/gui/kernel/qcocoaview_mac.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 0282c79..8576f52 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -549,8 +549,11 @@ static int qCocoaViewCount = 0; qwidgetprivate->syncBackingStore(qwidget->rect()); } - // Since we don't want to use the native engine, we must exit. - return; + // Since we don't want to use the native engine, we must exit, however + // widgets that are set to paint on screen, spesifically QGLWidget, + // requires the following code to execute in order to be drawn. + if (!qwidget->testAttribute(Qt::WA_PaintOnScreen)) + return; } CGContextRef cg = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; -- cgit v0.12