summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios
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
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')
-rw-r--r--src/plugins/platforms/ios/qioswindow.h2
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm5
2 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.h b/src/plugins/platforms/ios/qioswindow.h
index a5e122bda1..d36a81180c 100644
--- a/src/plugins/platforms/ios/qioswindow.h
+++ b/src/plugins/platforms/ios/qioswindow.h
@@ -74,6 +74,8 @@ public:
void handleContentOrientationChange(Qt::ScreenOrientation orientation);
void setVisible(bool visible);
+ bool isExposed() const Q_DECL_OVERRIDE;
+
void raise() { raiseOrLower(true); }
void lower() { raiseOrLower(false); }
void requestActivateWindow();
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