Cocoa: Bring back old exposure behavior on Mac OS X 10.6

Task-number: QTBUG-31864
Change-Id: Ife2429b2d6b845e5ccca31a03e66351a3ff5ba4b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Gabriel de Dietrich 2013-08-21 17:04:58 +02:00 committed by The Qt Project
parent 61948f84da
commit 2af8feee92

View File

@ -285,6 +285,10 @@ static QTouchDevice *touchDevice = 0;
Qt::WindowState newState = notificationName == NSWindowDidMiniaturizeNotification ?
Qt::WindowMinimized : Qt::WindowNoState;
[self notifyWindowStateChanged:newState];
// NSWindowDidOrderOnScreenAndFinishAnimatingNotification is private API, and not
// emitted in 10.6, so we bring back the old behavior for that case alone.
if (newState == Qt::WindowNoState && QSysInfo::QSysInfo::MacintoshVersion == QSysInfo::MV_10_6)
m_platformWindow->exposeWindow();
} else if ([notificationName isEqualToString: @"NSWindowDidOrderOffScreenNotification"]) {
m_platformWindow->obscureWindow();
} else if ([notificationName isEqualToString: @"NSWindowDidOrderOnScreenAndFinishAnimatingNotification"]) {