From 3892ccaca7d16ba056bf7c91cc15522bcf3754a3 Mon Sep 17 00:00:00 2001 From: Debao Zhang Date: Fri, 1 Jun 2012 03:36:32 -0700 Subject: [PATCH] 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 Reviewed-by: Laszlo Agocs --- src/widgets/kernel/qwidgetwindow_qpa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/kernel/qwidgetwindow_qpa.cpp b/src/widgets/kernel/qwidgetwindow_qpa.cpp index 3b1d69e46d..21a0ada831 100644 --- a/src/widgets/kernel/qwidgetwindow_qpa.cpp +++ b/src/widgets/kernel/qwidgetwindow_qpa.cpp @@ -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); }