summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qioswindow.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-12-04 16:32:47 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-05 13:41:41 +0100
commit95822e28e2b83730bab01b0c2f79f3c5a17d4090 (patch)
tree5f5ed8a792fbb54bc38c6a4ce3ba4c6660928b56 /src/plugins/platforms/ios/qioswindow.mm
parentec03058fa5b84b4570a2158bf2179f7ba4d83b99 (diff)
iOS: Don't claim that windows with zero width and/or height are exposed
When sending expose events to Qt, Qt will ask us if we're exposed, and we need to tell it that we're not, so that clients will not try to makeCurrent on a CA layer that has a zero width and/or height. Note that this only works because we flush expose events. Change-Id: Idfbe03a2f35681084061376a3c650a8da027fda4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qioswindow.mm')
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index 0dd810bdf6..587ecad61c 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -579,6 +579,11 @@ void QIOSWindow::applyGeometry(const QRect &rect)
[m_view layoutIfNeeded];
}
+bool QIOSWindow::isExposed() const
+{
+ return window()->isVisible() && !window()->geometry().isEmpty();
+}
+
void QIOSWindow::setWindowState(Qt::WindowState state)
{
// Update the QWindow representation straight away, so that