summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJani Hautakangas <jani.hautakangas@nokia.com>2011-01-10 11:22:15 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-01-12 08:41:27 (GMT)
commitfb4629e766e587a32aad7f1e6862d426c23441d6 (patch)
tree0ba8a591eaf6a6d233810d08d082bc3cb4359b15 /src
parent4e5544b2607e1e981eeb1df7e565d8ff35b66985 (diff)
downloadQt-fb4629e766e587a32aad7f1e6862d426c23441d6.zip
Qt-fb4629e766e587a32aad7f1e6862d426c23441d6.tar.gz
Qt-fb4629e766e587a32aad7f1e6862d426c23441d6.tar.bz2
Setting WA_TranslucentBackground after winid() is ineffective on Symbian.
Currently Symbian doesn't support semi-transparent EGL surfaces. WA_TranslucentBackground attribute is ineffective if set after EGL surface creation. To enable translucency in this case we need to recreate backing store to get raster surface which supports translucency. Task-number: QT-4416 Reviewed-by: Jason Barron (cherry picked from commit d62e9f4a6fe199ae790b1561fd4ba9ea84bd4d1e)
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qwidget_s60.cpp8
-rw-r--r--src/gui/painting/qgraphicssystem_runtime.cpp3
-rw-r--r--src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp2
3 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 7f8fec7..8e4e99a 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -780,6 +780,14 @@ void QWidgetPrivate::s60UpdateIsOpaque()
if (window->SetTransparencyAlphaChannel() == KErrNone) {
window->SetBackgroundColor(TRgb(255, 255, 255, 0));
extra->topextra->nativeWindowTransparencyEnabled = 1;
+
+ if (extra->topextra->backingStore.data() &&
+ QApplicationPrivate::graphics_system_name == QLatin1String("openvg")) {
+ // Semi-transparent EGL surfaces aren't supported. We need to
+ // recreate backing store to get translucent surface (raster surface).
+ extra->topextra->backingStore.create(q);
+ extra->topextra->backingStore.registerWidget(q);
+ }
}
} else if (extra->topextra->nativeWindowTransparencyEnabled) {
window->SetTransparentRegion(TRegionFix<1>());
diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp
index a5aa580..0294c4b 100644
--- a/src/gui/painting/qgraphicssystem_runtime.cpp
+++ b/src/gui/painting/qgraphicssystem_runtime.cpp
@@ -322,7 +322,6 @@ QRuntimeGraphicsSystem::QRuntimeGraphicsSystem()
: m_windowSurfaceDestroyPolicy(DestroyImmediately),
m_graphicsSystem(0)
{
- QApplicationPrivate::graphics_system_name = QLatin1String("runtime");
QApplicationPrivate::runtime_graphics_system = true;
#ifdef QT_DEFAULT_RUNTIME_SYSTEM
@@ -336,6 +335,8 @@ QRuntimeGraphicsSystem::QRuntimeGraphicsSystem()
#endif
m_graphicsSystem = QGraphicsSystemFactory::create(m_graphicsSystemName);
+
+ QApplicationPrivate::graphics_system_name = QLatin1String("runtime");
}
diff --git a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp
index 5b1b595..0c107b5 100644
--- a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp
+++ b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp
@@ -45,11 +45,13 @@
#if defined(Q_OS_SYMBIAN) && !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE)
#include <QtGui/private/qwidget_p.h>
#endif
+#include <QtGui/private/qapplication_p.h>
QT_BEGIN_NAMESPACE
QVGGraphicsSystem::QVGGraphicsSystem()
{
+ QApplicationPrivate::graphics_system_name = QLatin1String("openvg");
}
QPixmapData *QVGGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const