From fe7f4e9394f41125b045086f83340a637683131c Mon Sep 17 00:00:00 2001 From: Teemu Katajisto Date: Wed, 7 Nov 2012 12:23:46 +0200 Subject: [PATCH] Cocoa: fix backingstore flush for 10.8 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Remove compile time version check to make flushing work correctly when building with other sdks than 10.8. Task-number: QTBUG-27862 Change-Id: I915ae80017be1c03d5217aa9bdb60991603f8d01 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoabackingstore.mm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.mm b/src/plugins/platforms/cocoa/qcocoabackingstore.mm index eb0eb77..ef67275 100644 --- a/src/plugins/platforms/cocoa/qcocoabackingstore.mm +++ b/src/plugins/platforms/cocoa/qcocoabackingstore.mm @@ -73,15 +73,12 @@ 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 MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8 - 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]; - } -#endif + 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]; + } [cocoaWindow->m_contentView displayRect:rect]; } } -- 2.7.4