summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_s60.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwidget_s60.cpp')
-rw-r--r--src/gui/kernel/qwidget_s60.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index cf4bdf152d..609307c275 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -57,7 +57,7 @@
#include <eikbtgpc.h>
#endif
-// This is necessary in order to be able to perform delayed invokation on slots
+// This is necessary in order to be able to perform delayed invocation on slots
// which take arguments of type WId. One example is
// QWidgetPrivate::_q_delayedDestroy, which is used to delay destruction of
// CCoeControl objects until after the CONE event handler has finished running.
@@ -767,17 +767,24 @@ void QWidgetPrivate::s60UpdateIsOpaque()
if (!q->testAttribute(Qt::WA_WState_Created) || !q->testAttribute(Qt::WA_TranslucentBackground))
return;
+ createTLExtra();
+
RWindow *const window = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow());
#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
window->SetSurfaceTransparency(!isOpaque);
+ extra->topextra->nativeWindowTransparencyEnabled = !isOpaque;
#else
if (!isOpaque) {
const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA));
- if (window->SetTransparencyAlphaChannel() == KErrNone)
+ if (window->SetTransparencyAlphaChannel() == KErrNone) {
window->SetBackgroundColor(TRgb(255, 255, 255, 0));
- } else
+ extra->topextra->nativeWindowTransparencyEnabled = 1;
+ }
+ } else if (extra->topextra->nativeWindowTransparencyEnabled) {
window->SetTransparentRegion(TRegionFix<1>());
+ extra->topextra->nativeWindowTransparencyEnabled = 0;
+ }
#endif
}
@@ -936,6 +943,7 @@ void QWidgetPrivate::registerDropSite(bool /* on */)
void QWidgetPrivate::createTLSysExtra()
{
extra->topextra->inExpose = 0;
+ extra->topextra->nativeWindowTransparencyEnabled = 0;
}
void QWidgetPrivate::deleteTLSysExtra()