summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidgetrepaintmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qwidgetrepaintmanager.cpp')
-rw-r--r--src/widgets/kernel/qwidgetrepaintmanager.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/widgets/kernel/qwidgetrepaintmanager.cpp b/src/widgets/kernel/qwidgetrepaintmanager.cpp
index 99373f758c..11647ae05e 100644
--- a/src/widgets/kernel/qwidgetrepaintmanager.cpp
+++ b/src/widgets/kernel/qwidgetrepaintmanager.cpp
@@ -707,9 +707,9 @@ static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget)
/*!
Synchronizes the \a exposedRegion of the \a exposedWidget with the backing store.
- If there's nothing to repaint, the area is flushed and painting does not occur;
- otherwise the area is marked as dirty on screen and will be flushed right after
- we are done with all painting.
+ If there are dirty widgets, including but not limited to the \a exposedWidget,
+ these will be repainted first. The backingstore is then flushed to the screen,
+ regardless of whether or not there were any repaints.
*/
void QWidgetRepaintManager::sync(QWidget *exposedWidget, const QRegion &exposedRegion)
{
@@ -730,6 +730,9 @@ void QWidgetRepaintManager::sync(QWidget *exposedWidget, const QRegion &exposedR
return;
}
+ // As requests to sync a specific widget typically comes from an expose event
+ // we can't rely solely on our own dirty tracking to decide what to flush, and
+ // need to respect the platform's request to at least flush the entire widget,
QPoint offset = exposedWidget != tlw ? exposedWidget->mapTo(tlw, QPoint()) : QPoint();
markNeedsFlush(exposedWidget, exposedRegion, offset);