diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2014-10-30 16:52:36 +0100 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@digia.com> | 2014-11-05 08:44:36 +0100 |
commit | bb31aa853eb704bc916004ea59ad57bc6baa1276 (patch) | |
tree | 2476b3482e246cc4a80544ddedf5882656eba6e6 /src/plugins/platforms/cocoa/qcocoawindow.mm | |
parent | a2ce7e6a6f0f5c638aaa644255e9352eb91b57d6 (diff) |
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>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index f536e20b39..56c356711e 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -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; |