diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-04-09 10:53:32 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-04-09 10:53:32 (GMT) |
commit | 9020859ae8cf450a8f32608d54adfde089128355 (patch) | |
tree | 9bafaba1482f58ba6fb58e242040b5421caae659 /src/gui/painting | |
parent | 473d152acc9fe0d04167406c0926363c3eddd16c (diff) | |
download | Qt-9020859ae8cf450a8f32608d54adfde089128355.zip Qt-9020859ae8cf450a8f32608d54adfde089128355.tar.gz Qt-9020859ae8cf450a8f32608d54adfde089128355.tar.bz2 |
This seems to fix the resize issues
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qbackingstore.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index 30c042e..cc16fd0 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -419,9 +419,12 @@ void QWidgetBackingStore::endPaint(const QRegion &cleaned, QWindowSurface *windo QRegion QWidgetBackingStore::dirtyRegion(QWidget *widget) const { const bool widgetDirty = widget && widget != tlw; -#if !defined(Q_WS_LITE) const QRect tlwRect(topLevelRect()); +#if defined(Q_WS_LITE) + const QRect surfaceGeometry(tlwRect.topLeft(), windowSurface->size()); +#else const QRect surfaceGeometry(windowSurface->geometry()); +#endif if (surfaceGeometry != tlwRect && surfaceGeometry.size() != tlwRect.size()) { if (widgetDirty) { const QRect dirtyTlwRect = QRect(QPoint(), tlwRect.size()); @@ -431,7 +434,6 @@ QRegion QWidgetBackingStore::dirtyRegion(QWidget *widget) const } return QRect(QPoint(), tlwRect.size()); } -#endif // Calculate the region that needs repaint. QRegion r(dirty); @@ -1156,11 +1158,14 @@ void QWidgetBackingStore::sync() const bool updatesDisabled = !tlw->updatesEnabled(); bool repaintAllWidgets = false; -#if !defined(Q_WS_LITE) + const bool inTopLevelResize = tlwExtra->inTopLevelResize; const QRect tlwRect(topLevelRect()); +#ifdef Q_WS_LITE + const QRect surfaceGeometry(tlwRect.topLeft(), windowSurface->size()); +#else const QRect surfaceGeometry(windowSurface->geometry()); - +#endif if (inTopLevelResize || surfaceGeometry != tlwRect) { if ((inTopLevelResize || surfaceGeometry.size() != tlwRect.size()) && !updatesDisabled) { if (hasStaticContents()) { @@ -1180,9 +1185,13 @@ void QWidgetBackingStore::sync() repaintAllWidgets = true; } } +#ifdef Q_WS_LITE + windowSurface->resize(tlwRect.size()); +#else windowSurface->setGeometry(tlwRect); - } #endif + } + if (updatesDisabled) return; |