diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-03-04 15:53:09 +0100 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-03-04 17:00:49 +0100 |
commit | c28a7828a28295d66d37cddca9d23a70f37f2c75 (patch) | |
tree | 66726c8a17c1f2c4dfc55ad8d021897e4426f611 /src/gui/painting/qbackingstore.cpp | |
parent | 30dba6b22f907ba36ed8f71568ab2489536f8f43 (diff) | |
download | qt4-tools-c28a7828a28295d66d37cddca9d23a70f37f2c75.tar.gz |
Make translucent windows work, and support WA_TranslucentBackground
QWS will make a window translucent if the background brush is not
opaque. Now we also support the cross-platform way of doing it.
This also includes fixes for bugs caused by behavioural changes in
the internal windowsurface/backingstore implementation.
Task-number: QTBUG-5739
Reviewed-by: Tom
Diffstat (limited to 'src/gui/painting/qbackingstore.cpp')
-rw-r--r-- | src/gui/painting/qbackingstore.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index c73d9f4c44..8de9eaa5c8 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -352,6 +352,10 @@ void QWidgetBackingStore::beginPaint(QRegion &toClean, QWidget *widget, QWindowS // Always flush repainted areas. dirtyOnScreen += toClean; +#ifdef Q_WS_QWS + toClean.translate(tlwOffset); +#endif + #ifdef QT_NO_PAINT_DEBUG windowSurface->beginPaint(toClean); #else @@ -766,7 +770,12 @@ void QWidgetBackingStore::paintWindowDecoration() if (decorationRegion.isEmpty()) return; - windowSurface->beginPaint(decorationRegion); + //### The QWS decorations do not always paint the pixels they promise to paint. + // This causes painting problems with QWSMemorySurface. Since none of the other + // window surfaces actually use the region, passing an empty region is a safe + // workaround. + + windowSurface->beginPaint(QRegion()); QPaintEngine *engine = windowSurface->paintDevice()->paintEngine(); Q_ASSERT(engine); |