summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-08-03 14:55:39 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-06 03:21:38 +0200
commit054645c846e94eb9aa14772685340ddb5d9a505f (patch)
treecdea78c24a00227abf6caf83cb0070ab1d8daa6c /src/widgets/kernel
parente033d59c944c6d25ebbefcfd0760d81c5b9eca99 (diff)
Do not call markDirty() for hidden widgets.
Fixed crash when resizing a scroll area with a native viewport (typically a QGLWidget) causes the scroll bars to get hidden, while there are still expose events in the queue for the scroll bar widget. Task-number: QTBUG-26746 Change-Id: Ia77c8eb32a6730670333120af3f9a772c64807f1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 10de176834..66313424a0 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -492,7 +492,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() && m_widget->updatesEnabled()) {
+ if (m_widget->internalWinId() && !m_widget->isWindow() && m_widget->isVisible() && m_widget->updatesEnabled()) {
if (QWidgetBackingStore *bs = m_widget->d_func()->maybeBackingStore())
bs->markDirty(event->region(), m_widget);
}