diff options
author | Fabien Freling <fabien.freling@nokia.com> | 2011-03-30 12:42:45 (GMT) |
---|---|---|
committer | Fabien Freling <fabien.freling@nokia.com> | 2011-03-30 12:42:45 (GMT) |
commit | 0686a6d656641f2ac1fc1cd9710dcf538f8ff5c8 (patch) | |
tree | fca656fab8a98b29ab594195ed397b485f3913f7 /src | |
parent | afba7910d6805c615c648f938a4fb53a10f0710d (diff) | |
download | Qt-0686a6d656641f2ac1fc1cd9710dcf538f8ff5c8.zip Qt-0686a6d656641f2ac1fc1cd9710dcf538f8ff5c8.tar.gz Qt-0686a6d656641f2ac1fc1cd9710dcf538f8ff5c8.tar.bz2 |
Fix the painting for widgets painting directly on screen.
Reviewed-by: Jiang Jiang
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 54e7e3e..b5e5d18 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -254,7 +254,10 @@ static int qCocoaViewCount = 0; qt_mac_retain_graphics_context(context); // We use a different graphics system. - if (QApplicationPrivate::graphicsSystem() != 0) { + // + // Widgets that are set to paint on screen, specifically QGLWidget, + // requires the native engine to execute in order to be drawn. + if (QApplicationPrivate::graphicsSystem() != 0 && !qwidget->testAttribute(Qt::WA_PaintOnScreen)) { // Raster engine. if (QApplicationPrivate::graphics_system_name == QLatin1String("raster")) { @@ -334,12 +337,6 @@ static int qCocoaViewCount = 0; qwidget->update(qwidget->rect()); qwidgetprivate->syncBackingStore(qwidget->rect()); } - - // Since we don't want to use the native engine, we must exit, however - // widgets that are set to paint on screen, specifically QGLWidget, - // requires the following code to execute in order to be drawn. - if (!qwidget->testAttribute(Qt::WA_PaintOnScreen)) - return; } // Native engine. |