summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2010-06-30 16:53:55 (GMT)
committerQt Commercial Integration <QtCommercial@digia.com>2012-01-31 10:24:50 (GMT)
commitc242e79b3b03668ba347b9bcf833f22f4386f08f (patch)
treeeda5b164c5dcab38a6f270b7c5e67136e22f71f2 /src
parent72d58eb695d39bc653e0b5a7388aa7adff887d41 (diff)
downloadQt-c242e79b3b03668ba347b9bcf833f22f4386f08f.zip
Qt-c242e79b3b03668ba347b9bcf833f22f4386f08f.tar.gz
Qt-c242e79b3b03668ba347b9bcf833f22f4386f08f.tar.bz2
Fix the blank areas during resize with the raster engine on Mac OS X.
This is mainly done by reverting the commit 04e34fe3aecca482abeeabe2e31778e9102eeb08 Task-number: QTBUG-11518 Reviewed-by: Samuel
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm10
-rw-r--r--src/gui/kernel/qwidget.cpp12
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp3
3 files changed, 7 insertions, 18 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 03b6b17..62b9f77 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -533,13 +533,11 @@ static int qCocoaViewCount = 0;
return;
if (QApplicationPrivate::graphicsSystem() != 0) {
- if (qwidgetprivate->maybeBackingStore()) {
- // Drawing is handled on the window level
- // See qcocoasharedwindowmethods_mac_p.h
- if (!qwidget->testAttribute(Qt::WA_PaintOnScreen))
- return;
- }
+ if (QWidgetBackingStore *bs = qwidgetprivate->maybeBackingStore())
+ bs->markDirty(qwidget->rect(), qwidget);
+ qwidgetprivate->syncBackingStore(qwidget->rect());
}
+
CGContextRef cg = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
qwidgetprivate->hd = cg;
CGContextSaveGState(cg);
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index bda0885..39b15a3 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -1858,13 +1858,7 @@ void QWidgetPrivate::syncBackingStore()
repaint_sys(dirty);
dirty = QRegion();
} else if (QWidgetBackingStore *bs = maybeBackingStore()) {
-#ifdef QT_MAC_USE_COCOA
- Q_UNUSED(bs);
- void qt_mac_set_needs_display(QWidget *, QRegion);
- qt_mac_set_needs_display(q_func(), QRegion());
-#else
bs->sync();
-#endif
}
}
@@ -1873,13 +1867,7 @@ void QWidgetPrivate::syncBackingStore(const QRegion &region)
if (paintOnScreen())
repaint_sys(region);
else if (QWidgetBackingStore *bs = maybeBackingStore()) {
-#ifdef QT_MAC_USE_COCOA
- Q_UNUSED(bs);
- void qt_mac_set_needs_display(QWidget *, QRegion);
- qt_mac_set_needs_display(q_func(), region);
-#else
bs->sync(q_func(), region);
-#endif
}
}
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
index f271e56..37c671a 100644
--- a/src/gui/painting/qwindowsurface_raster.cpp
+++ b/src/gui/painting/qwindowsurface_raster.cpp
@@ -295,7 +295,10 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
CGContextRestoreGState(context);
#ifndef QT_MAC_USE_COCOA
QDEndCGContext(port, &context);
+#else
+ CGContextFlush(context);
#endif
+
#endif // Q_WS_MAC
#ifdef Q_OS_SYMBIAN