From 4886923c5024d6d50a42cbe11893cfb2f0169a76 Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Tue, 20 Apr 2010 11:15:41 +0200 Subject: Fix window transparency on Symbian. In the create_sys() function where native handles are created, we were only looking at the "isOpaque" flag to determine if a window should be translucent or not. This is not the correct thing to do because transparency should only be granted if the application explicitly sets the Qt::WA_TranslucentBackground flag. The fix is to defer the transparency decision to s60UpdateIsOpaque() which does the right thing. Reviewed-by: Jani Hautakangas --- src/gui/kernel/qwidget_s60.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 7fd9289..c30814b 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -387,16 +387,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de | EPointerFilterMove | EPointerFilterDrag, 0); drawableWindow->EnableVisibilityChangeEvents(); - if (!isOpaque) { - RWindow *const window = static_cast(drawableWindow); -#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE - window->SetSurfaceTransparency(true); -#else - const TDisplayMode displayMode = static_cast(window->SetRequiredDisplayMode(EColor16MA)); - if (window->SetTransparencyAlphaChannel() == KErrNone) - window->SetBackgroundColor(TRgb(255, 255, 255, 0)); -#endif - } + s60UpdateIsOpaque(); } q->setAttribute(Qt::WA_WState_Created); -- cgit v0.12