From a890c78980a7457e0fd32d57f07e447f9e8e4409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 16 Nov 2012 07:09:03 +0100 Subject: Use setImage workaround on all OS X versions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/platforms/cocoa/qcocoabackingstore.mm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/plugins') 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(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]; } } -- cgit v1.2.3