summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);