summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosscreen.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-11-25 15:45:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-25 23:56:40 +0100
commitc2f08598e1cc3089505dd8037d333071da0f231f (patch)
tree5955d9111e18e2351e4e3806a672b35f9d702cae /src/plugins/platforms/ios/qiosscreen.mm
parent6820ac594af949527d17d0b32205377fc767f527 (diff)
iOS: Update statusbar visibility and screen properties before window geometry
When setting a new window state. Otherwise we set the geometry based on the old screen properties, and then rely on the properties causing another window layout, which may not always happen. We also need to explicitly update the screen properties when the statusbar changes visibility, as there are no callbacks from iOS that consistently gives us that information. Change-Id: I1c3328aa3f34d294bc7db8884e611d205fd2c761 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.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm
index 7746163357..57522cb1a3 100644
--- a/src/plugins/platforms/ios/qiosscreen.mm
+++ b/src/plugins/platforms/ios/qiosscreen.mm
@@ -205,10 +205,14 @@ void QIOSScreen::updateStatusBarVisibility()
} else
#endif
{
+ bool wasHidden = [UIApplication sharedApplication].statusBarHidden;
QIOSViewController *viewController = static_cast<QIOSViewController *>(view.viewController);
[[UIApplication sharedApplication]
setStatusBarHidden:[viewController prefersStatusBarHidden]
withAnimation:UIStatusBarAnimationNone];
+
+ if ([UIApplication sharedApplication].statusBarHidden != wasHidden)
+ updateProperties();
}
}