QWidgetWindow: Fix handleExposeEvent()

When the associated widget of QWidgetWindow is visible but its
updates are not enabled, avoid marking the widget dirty.

Task-number: QTBUG-25991
Change-Id: Ibeac4c0dfd3198a5174372331e50628b0d3a480d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
This commit is contained in:
Debao Zhang 2012-06-01 03:36:32 -07:00 committed by Qt by Nokia
parent 2268be8040
commit 3892ccaca7

View File

@ -474,7 +474,7 @@ void QWidgetWindow::handleExposeEvent(QExposeEvent *event)
m_widget->setAttribute(Qt::WA_Mapped);
if (!event->region().isNull()) {
// Exposed native widgets need to be marked dirty to get them repainted correctly.
if (m_widget->internalWinId() && !m_widget->isWindow()) {
if (m_widget->internalWinId() && !m_widget->isWindow() && m_widget->updatesEnabled()) {
if (QWidgetBackingStore *bs = m_widget->d_func()->maybeBackingStore())
bs->markDirty(event->region(), m_widget);
}