summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qwindowsurface_raster.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-07-28 07:41:00 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-07-28 08:13:38 (GMT)
commit8cfdb13015a58905539c25334e05492f9afe103b (patch)
tree5f06b20584c3835ed1d494e97de7551c48a270ce /src/gui/painting/qwindowsurface_raster.cpp
parent444bbfe4f9e82a4d70c707a6c35da54065c6958e (diff)
downloadQt-8cfdb13015a58905539c25334e05492f9afe103b.zip
Qt-8cfdb13015a58905539c25334e05492f9afe103b.tar.gz
Qt-8cfdb13015a58905539c25334e05492f9afe103b.tar.bz2
Don't use layered windows for non-translucent windows
Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting/qwindowsurface_raster.cpp')
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
index 409d297..7fe5478 100644
--- a/src/gui/painting/qwindowsurface_raster.cpp
+++ b/src/gui/painting/qwindowsurface_raster.cpp
@@ -128,7 +128,7 @@ QPaintDevice *QRasterWindowSurface::paintDevice()
void QRasterWindowSurface::beginPaint(const QRegion &rgn)
{
#if (defined(Q_WS_X11) && !defined(QT_NO_XRENDER)) || (defined(Q_WS_WIN) && !defined(Q_OS_WINCE))
- if (!qt_widget_private(window())->isOpaque) {
+ if (!qt_widget_private(window())->isOpaque && window()->testAttribute(Qt::WA_TranslucentBackground)) {
#if defined(Q_WS_WIN) && !defined(Q_OS_WINCE)
if (d_ptr->image->image.format() != QImage::Format_ARGB32_Premultiplied
&& d_ptr->canUseLayeredWindow)
@@ -160,7 +160,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
QRect br = rgn.boundingRect();
#ifndef Q_OS_WINCE
- if (!qt_widget_private(window())->isOpaque && d->canUseLayeredWindow) {
+ if (!qt_widget_private(window())->isOpaque && d->canUseLayeredWindow && window()->testAttribute(Qt::WA_TranslucentBackground)) {
QRect r = window()->frameGeometry();
QPoint frameOffset = qt_widget_private(window())->frameStrut().topLeft();
QRect dirtyRect = br.translated(offset + frameOffset);