summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qbackingstore.cpp
diff options
context:
space:
mode:
authorUwe Rathmann <Uwe.Rathmann@tigertal.de>2010-06-26 12:34:49 (GMT)
committerDonald Carr <donald.carr@nokia.com>2010-08-17 15:13:25 (GMT)
commit5eaf1f41b17eb6f73420f1a9a5e48957015d2e4e (patch)
treec2d891946cfca030ba5c23bcf9da20ac713aa087 /src/gui/painting/qbackingstore.cpp
parent1970e2d46656db8178636e06c82287f536b626c7 (diff)
downloadQt-5eaf1f41b17eb6f73420f1a9a5e48957015d2e4e.zip
Qt-5eaf1f41b17eb6f73420f1a9a5e48957015d2e4e.tar.gz
Qt-5eaf1f41b17eb6f73420f1a9a5e48957015d2e4e.tar.bz2
Fixes QWS window decoration offset issues
When using OpenGL ES in conjunction with Qt/Embedded, Q_BACKINGSTORE_SUBSURFACES is defined and the subsequent code path shared between this define and QWS defines results in window decoration offset errors. Merge-request: 714 Reviewed-by: Donald Carr <donald.carr@nokia.com>
Diffstat (limited to 'src/gui/painting/qbackingstore.cpp')
-rw-r--r--src/gui/painting/qbackingstore.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index 83751ed..446c867 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -353,8 +353,10 @@ void QWidgetBackingStore::beginPaint(QRegion &toClean, QWidget *widget, QWindowS
dirtyOnScreen += toClean;
#ifdef Q_WS_QWS
+#ifndef Q_BACKINGSTORE_SUBSURFACES
toClean.translate(tlwOffset);
#endif
+#endif
#ifdef QT_NO_PAINT_DEBUG
windowSurface->beginPaint(toClean);
@@ -1294,7 +1296,12 @@ void QWidgetBackingStore::sync()
#ifdef Q_BACKINGSTORE_SUBSURFACES
QWindowSurface *subSurface = w->windowSurface();
BeginPaintInfo beginPaintInfo;
- beginPaint(toBePainted, w, subSurface, &beginPaintInfo, false);
+
+ QPoint off = w->mapTo(tlw, QPoint());
+ toBePainted.translate(off);
+ beginPaint(toBePainted, w, subSurface, &beginPaintInfo, true);
+ toBePainted.translate(-off);
+
if (beginPaintInfo.nothingToPaint)
continue;