Cocoa: refactor commit 876a428f
.
Conditions for when updateExposedGeometry() should actually send the expose event goes into the function itself. The window()->isVisible() check could arguably be moved to isWindowExposable(), but I'm keeping this as a straight refactor without any behavior changes. (isWindowExposable() is called from multiple locations) Change-Id: I6d792286ccbc50065ebfc588daca2240761a1937 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
parent
a2ce7e6a6f
commit
bb31aa853e
@ -1754,6 +1754,11 @@ void QCocoaWindow::updateExposedGeometry()
|
||||
if (!m_geometryUpdateExposeAllowed)
|
||||
return;
|
||||
|
||||
// Do not send incorrect exposes in case the window is not even visible yet.
|
||||
// We might get here as a result of a resize() from QWidget's show(), for instance.
|
||||
if (!window()->isVisible())
|
||||
return;
|
||||
|
||||
if (!isWindowExposable())
|
||||
return;
|
||||
|
||||
|
@ -361,12 +361,8 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
|
||||
// Send a geometry change event to Qt, if it's ready to handle events
|
||||
if (!m_platformWindow->m_inConstructor) {
|
||||
QWindowSystemInterface::handleGeometryChange(m_window, geometry);
|
||||
// Do not send incorrect exposes in case the window is not even visible yet.
|
||||
// We might get here as a result of a resize() from QWidget's show(), for instance.
|
||||
if (m_platformWindow->window()->isVisible()) {
|
||||
m_platformWindow->updateExposedGeometry();
|
||||
QWindowSystemInterface::flushWindowSystemEvents();
|
||||
}
|
||||
m_platformWindow->updateExposedGeometry();
|
||||
QWindowSystemInterface::flushWindowSystemEvents();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user