diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2012-11-16 07:09:03 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-20 08:49:19 +0100 |
commit | a890c78980a7457e0fd32d57f07e447f9e8e4409 (patch) | |
tree | ed243408ee78a950f6e248a2d7c03edc3bc1a4a2 /src/plugins/platforms/cocoa | |
parent | b98b11fa036ea301d1483df6f533ec55be727d9d (diff) |
Use setImage workaround on all OS X versions.
The painting bug that we are working around/fixing
here has been observed on 10.7 as well.
Change-Id: Ic29421bcc84405afa085af2f0ed2bc554c684f98
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoabackingstore.mm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.mm b/src/plugins/platforms/cocoa/qcocoabackingstore.mm index ef67275208..8a20ed83f7 100644 --- a/src/plugins/platforms/cocoa/qcocoabackingstore.mm +++ b/src/plugins/platforms/cocoa/qcocoabackingstore.mm @@ -73,12 +73,9 @@ void QCocoaBackingStore::flush(QWindow *widget, const QRegion ®ion, const QPo NSRect rect = NSMakeRect(geo.x(), geo.y(), geo.width(), geo.height()); QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(window()->handle()); if (cocoaWindow) { - if (QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_8) { - // Workaround for malfunctioning displayRect on 10.8 where - // calling it seems to have no effect. Call setImage like - // resize() does. - [cocoaWindow->m_contentView setImage:m_image]; - } + // setImage call is needed here to make the displayRect call + // have effect - even if the image has not changed. + [cocoaWindow->m_contentView setImage:m_image]; [cocoaWindow->m_contentView displayRect:rect]; } } |