summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosscreen.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2012-11-08 17:12:54 +0100
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-27 23:55:41 +0100
commit3d81b43aa462c66e11f772398550e76ce4cee6de (patch)
tree11b0f4b5a819cea0e770ec7d0fb65210f5d77af5 /src/plugins/platforms/ios/qiosscreen.mm
parent8d7238f57e9a85524ea550917f051b9eb9927922 (diff)
iOS: Implement QPlatformScreen::availableGeometry()
This will sadly not work as expected until we've found a way to kick off the iOS event loop before QApplication is initialized, as UIScreen does not seem to report the correct applicationFrame (taking the status bar into account) until after the UIApplication has been set up by UIApplicationMain(). Change-Id: I0eaa3b8bca4129d1c4183a202ad2ecd0d8bc52d0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosscreen.mm')
-rw-r--r--src/plugins/platforms/ios/qiosscreen.mm8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm
index 93b22953e2..effd19070a 100644
--- a/src/plugins/platforms/ios/qiosscreen.mm
+++ b/src/plugins/platforms/ios/qiosscreen.mm
@@ -99,11 +99,15 @@ QIOSScreen::QIOSScreen(unsigned int screenIndex)
QRect QIOSScreen::geometry() const
{
- // FIXME: Do we need to reimplement availableGeometry() to take the
- // system statusbar into account?
return m_geometry;
}
+QRect QIOSScreen::availableGeometry() const
+{
+ CGRect frame = m_uiScreen.applicationFrame;
+ return QRect(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
+}
+
int QIOSScreen::depth() const
{
return m_depth;