diff options
author | Jason Barron <jbarron@trolltech.com> | 2010-04-20 09:15:41 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2010-04-21 07:41:02 (GMT) |
commit | 4886923c5024d6d50a42cbe11893cfb2f0169a76 (patch) | |
tree | 078f93271625068146d2b99357df3b3a0e6a4cc8 /src/gui | |
parent | b1cc0f58970cc07f81671f200d13d9182dce3370 (diff) | |
download | Qt-4886923c5024d6d50a42cbe11893cfb2f0169a76.zip Qt-4886923c5024d6d50a42cbe11893cfb2f0169a76.tar.gz Qt-4886923c5024d6d50a42cbe11893cfb2f0169a76.tar.bz2 |
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
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 11 |
1 files changed, 1 insertions, 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<RWindow *>(drawableWindow); -#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE - window->SetSurfaceTransparency(true); -#else - const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA)); - if (window->SetTransparencyAlphaChannel() == KErrNone) - window->SetBackgroundColor(TRgb(255, 255, 255, 0)); -#endif - } + s60UpdateIsOpaque(); } q->setAttribute(Qt::WA_WState_Created); |