summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qwindowsurface_s60.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-04-15 12:12:20 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-04-28 14:42:20 (GMT)
commitc4e2008731cd7c9df922921c52294f84205fccb9 (patch)
tree969814f41c4b51659029656cf6f002add050d707 /src/gui/painting/qwindowsurface_s60.cpp
parent20a0448cfe6e683e8bc66d3bd62a0981067602f9 (diff)
downloadQt-c4e2008731cd7c9df922921c52294f84205fccb9.zip
Qt-c4e2008731cd7c9df922921c52294f84205fccb9.tar.gz
Qt-c4e2008731cd7c9df922921c52294f84205fccb9.tar.bz2
Fixes: Add support for translucent windows in Symbian.
Warning, this is completely untested! Details: This should (in theory) get translucent windows working but this hasn't been tested yet. The emulator environment seems to return only 16ColorMU display modes which implies the window is opague so Qt ignores the translucent flag. HW seems to create 16ColorMA windows, but it hasn't been tested there yet either (no time).
Diffstat (limited to 'src/gui/painting/qwindowsurface_s60.cpp')
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index b262cb2..d0c3e1c 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -12,7 +12,7 @@
#include <qglobal.h> // for Q_WS_WIN define (non-PCH)
#include <QtGui/qpaintdevice.h>
-#include <QtGui/qwidget.h>
+#include <private/qwidget_p.h>
#include "qwindowsurface_s60_p.h"
#include "qt_s60_p.h"
@@ -143,6 +143,15 @@ void QS60WindowSurface::lockBitmapHeap()
// Get some values for QImage creation
TDisplayMode mode = bitmap->DisplayMode();
+ QWidget *win = QS60WindowSurfacePrivate::lockedSurface->window();
+ RWindowBase *rwin = win->winId()->DrawableWindow();
+ TDisplayMode rwMode = rwin->DisplayMode();
+
+ mode = rwMode;
+
+ if (mode == EColor16MA
+ && qt_widget_private(QS60WindowSurfacePrivate::lockedSurface->window())->isOpaque)
+ mode = EColor16MU;
QImage::Format format = qt_TDisplayMode2Format( mode );
TSize bitmapSize = bitmap->SizeInPixels();
int bytesPerLine = CFbsBitmap::ScanLineLength( bitmapSize.iWidth, mode);