src/gui/painting/qbackingstore.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
child 7 f7bc934e204c
--- a/src/gui/painting/qbackingstore.cpp	Tue Jan 26 12:42:25 2010 +0200
+++ b/src/gui/painting/qbackingstore.cpp	Tue Feb 02 00:43:10 2010 +0200
@@ -498,18 +498,6 @@
     if (!widget)
         return;
 
-#if defined(Q_WS_WIN) && !defined(Q_OS_WINCE)
-    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));
-        InvalidateRgn(widget->internalWinId(), rgn.handle(), false);
-        qt_widget_private(widget)->dirty = QRegion();
-        return;
-    }
-#endif
-
     if (updateImmediately) {
         QEvent event(QEvent::UpdateRequest);
         QApplication::sendEvent(widget, &event);
@@ -541,7 +529,9 @@
     Q_ASSERT(widget->window() == tlw);
     Q_ASSERT(!rgn.isEmpty());
 
+#ifndef QT_NO_GRAPHICSEFFECT
     widget->d_func()->invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
 
     if (widget->d_func()->paintOnScreen()) {
         if (widget->d_func()->dirty.isEmpty()) {
@@ -571,9 +561,11 @@
 
     if (invalidateBuffer) {
         const bool eventAlreadyPosted = !dirty.isEmpty();
+#ifndef QT_NO_GRAPHICSEFFECT
         if (widget->d_func()->graphicsEffect)
             dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect()).translated(offset);
         else
+#endif //QT_NO_GRAPHICSEFFECT
             dirty += rgn.translated(offset);
         if (!eventAlreadyPosted || updateImmediately)
             sendUpdateRequest(tlw, updateImmediately);
@@ -588,9 +580,11 @@
 
     if (widget->d_func()->inDirtyList) {
         if (!qt_region_strictContains(widget->d_func()->dirty, widgetRect)) {
+#ifndef QT_NO_GRAPHICSEFFECT
             if (widget->d_func()->graphicsEffect)
                 widget->d_func()->dirty += widget->d_func()->effectiveRectFor(rgn.boundingRect());
             else
+#endif //QT_NO_GRAPHICSEFFECT
                 widget->d_func()->dirty += rgn;
         }
     } else {
@@ -618,7 +612,9 @@
     Q_ASSERT(widget->window() == tlw);
     Q_ASSERT(!rect.isEmpty());
 
+#ifndef QT_NO_GRAPHICSEFFECT
     widget->d_func()->invalidateGraphicsEffectsRecursively();
+#endif //QT_NO_GRAPHICSEFFECT
 
     if (widget->d_func()->paintOnScreen()) {
         if (widget->d_func()->dirty.isEmpty()) {
@@ -891,7 +887,7 @@
     const QRect parentRect(rect & clipR);
 
     bool accelerateMove = accelEnv && isOpaque
-#ifndef QT_NO_GRAPHICSCVIEW
+#ifndef QT_NO_GRAPHICSVIEW
                           // No accelerate move for proxy widgets.
                           && !tlw->d_func()->extra->proxyWidget
 #endif
@@ -953,6 +949,8 @@
         return;
 
     QWidgetBackingStore *wbs = x->backingStore;
+    if (!wbs)
+        return;
 
     static int accelEnv = -1;
     if (accelEnv == -1) {
@@ -1189,7 +1187,7 @@
                                            : wd->dirty);
         toClean += widgetDirty;
 
-#ifndef QT_NO_GRAPHICSCVIEW
+#ifndef QT_NO_GRAPHICSVIEW
         if (tlw->d_func()->extra->proxyWidget) {
             resetWidget(w);
             continue;