From 1510411a38cdf0359e2353d7f52d1795294a1d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 22 Oct 2014 21:28:16 +0200 Subject: Revert "Cocoa: Send obscure events on OcclusionStateHidden" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This caused instability in the CI and testing system: Tests that expected expose and paint events no longer got them due to window placement/visibility, including: tst_QGraphicsProxyWidget::paintEvent tst_QMdiArea::tileSubWindows tst_QSizeGrip::hideAndShowOnWindowStateChange This reverts commit f5cf06f4afc48198780e3c3d0d1a52afce425507. Change-Id: I017fbf24f3ad99cce6602eddafc3a67f8edc494d Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qnsview.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 92ab16683e..9cd075fdec 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -420,10 +420,12 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil; #pragma clang diagnostic ignored "-Wobjc-method-access" enum { NSWindowOcclusionStateVisible = 1UL << 1 }; #endif + // Older versions managed in -[QNSView viewDidMoveToWindow]. + // Support QWidgetAction in NSMenu. Mavericks only sends this notification. + // Ideally we should support this in Qt as well, in order to disable animations + // when the window is occluded. if ((NSUInteger)[self.window occlusionState] & NSWindowOcclusionStateVisible) m_platformWindow->exposeWindow(); - else - m_platformWindow->obscureWindow(); #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 #pragma clang diagnostic pop #endif -- cgit v1.2.3