Send screen change events before expose events.

This fixes the "expose event received for window
with invalid geometry" warning from Qt Quick. The
window's current screen is now up to date when
processing the expose event.

Change-Id: Ia5c83e34154182699ec587835f9063809d819d7d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
Morten Johan Sørvig 2014-10-26 21:48:08 +01:00 committed by Laszlo Agocs
parent 2d0b251b1d
commit be8f647364

View File

@ -437,9 +437,9 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
if (m_window) {
NSUInteger screenIndex = [[NSScreen screens] indexOfObject:self.window.screen];
if (screenIndex != NSNotFound) {
m_platformWindow->updateExposedGeometry();
QCocoaScreen *cocoaScreen = QCocoaIntegration::instance()->screenAtIndex(screenIndex);
QWindowSystemInterface::handleWindowScreenChanged(m_window, cocoaScreen->screen());
m_platformWindow->updateExposedGeometry();
}
}
} else {