From: Morten Johan Sørvig Date: Fri, 16 Nov 2012 06:09:03 +0000 (+0100) Subject: Use setImage workaround on all OS X versions. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a890c78980a7457e0fd32d57f07e447f9e8e4409;p=profile%2Fivi%2Fqtbase.git 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 Reviewed-by: Teemu Katajisto Reviewed-by: Morten Johan Sørvig --- diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.mm b/src/plugins/platforms/cocoa/qcocoabackingstore.mm index ef67275..8a20ed8 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(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]; } }