diff options
Diffstat (limited to 'src/gui/painting/qbackingstore.cpp')
-rw-r--r-- | src/gui/painting/qbackingstore.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index fbac811a..0a3a8dd 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -492,7 +492,8 @@ static inline void sendUpdateRequest(QWidget *widget, bool updateImmediately) return; #if defined(Q_WS_WIN) && !defined(Q_OS_WINCE) - if (QApplicationPrivate::inSizeMove && widget->internalWinId() && !updateImmediately) { + if (QApplicationPrivate::inSizeMove && widget->internalWinId() && !updateImmediately + && !widget->testAttribute(Qt::WA_DontShowOnScreen)) { // Tell Windows to send us a paint event if we're in WM_SIZE/WM_MOVE; posted events // are blocked until the mouse button is released. See task 146849. const QRegion rgn(qt_dirtyRegion(widget)); @@ -1510,6 +1511,9 @@ void QWidgetPrivate::invalidateBuffer(const QRect &rect) void QWidgetPrivate::repaint_sys(const QRegion &rgn) { + if (data.in_destructor) + return; + Q_Q(QWidget); if (q->testAttribute(Qt::WA_StaticContents)) { if (!extra) @@ -1517,13 +1521,20 @@ void QWidgetPrivate::repaint_sys(const QRegion &rgn) extra->staticContentsSize = data.crect.size(); } + QPaintEngine *engine = q->paintEngine(); + // QGLWidget does not support partial updates if: + // 1) The context is double buffered + // 2) The context is single buffered and auto-fill background is enabled. + const bool noPartialUpdateSupport = (engine && engine->type() == QPaintEngine::OpenGL) + && (usesDoubleBufferedGLContext || q->autoFillBackground()); + QRegion toBePainted(noPartialUpdateSupport ? q->rect() : rgn); + #ifdef Q_WS_MAC // No difference between update() and repaint() on the Mac. - update_sys(rgn); + update_sys(toBePainted); return; #endif - QRegion toBePainted(rgn); toBePainted &= clipRect(); clipToEffectiveMask(toBePainted); if (toBePainted.isEmpty()) |