summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-22 10:09:53 +0200
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-22 12:39:33 +0200
commit5281f264dc605766ba82c36fc2c88055234824ff (patch)
tree0c16efb51157d22496b44b4885f11bc2b89d51a7 /src/gui/painting
parent4c515cebc653e44fe6374058b205610592128ea4 (diff)
Moving a child widget right after show() does not work as expected.
The problem was that we did an accelerated move, i.e. scrolled the widget's contents in the backing store and repainted the old area. We cannot do this trick when the widget has been invalidated (show(), resize()). In this case the widget had never been painted, so we basically scrolled the content of its parent and the widget itself appeared as invisible. Auto-test included. Task-number: 255117 Reviewed-by: Paul
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qbackingstore.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index 0f7933cca9..3bbdf7ff86 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -258,7 +258,10 @@ void QWidgetBackingStore::unflushPaint(QWidget *widget, const QRegion &rgn)
bool QWidgetBackingStore::bltRect(const QRect &rect, int dx, int dy, QWidget *widget)
{
const QPoint pos(tlwOffset + widget->mapTo(tlw, rect.topLeft()));
- return windowSurface->scroll(QRect(pos, rect.size()), dx, dy);
+ const QRect tlwRect(QRect(pos, rect.size()));
+ if (dirty.intersects(tlwRect))
+ return false; // We don't want to scroll junk.
+ return windowSurface->scroll(tlwRect, dx, dy);
}
void QWidgetBackingStore::releaseBuffer()